Chromium Code Reviews| Index: remoting/protocol/performance_tracker.h |
| diff --git a/remoting/protocol/performance_tracker.h b/remoting/protocol/performance_tracker.h |
| index 3e5bf2c5f6b6eedafb65e64a3d292ffb0128c39b..7d87b25fdee8fa84656420a4ad5be61c32076894 100644 |
| --- a/remoting/protocol/performance_tracker.h |
| +++ b/remoting/protocol/performance_tracker.h |
| @@ -13,7 +13,7 @@ |
| #include "base/macros.h" |
| #include "base/timer/timer.h" |
| #include "remoting/base/rate_counter.h" |
| -#include "remoting/base/running_average.h" |
| +#include "remoting/base/running_samples.h" |
| namespace remoting { |
| @@ -55,6 +55,13 @@ class PerformanceTracker { |
| double video_paint_ms() { return video_paint_ms_.Average(); } |
| double round_trip_ms() { return round_trip_ms_.Average(); } |
| + // Return running-maxes for latencies |
| + int64_t max_video_capture_ms() { return video_capture_ms_.Max(); } |
|
Sergey Ulanov
2016/03/18 19:42:06
Update the functions above to return RunningSample
Yuwei
2016/03/18 20:06:00
Acknowledged.
|
| + int64_t max_video_encode_ms() { return video_encode_ms_.Max(); } |
| + int64_t max_video_decode_ms() { return video_decode_ms_.Max(); } |
| + int64_t max_video_paint_ms() { return video_paint_ms_.Max(); } |
| + int64_t max_round_trip_ms() { return round_trip_ms_.Max(); } |
| + |
| // Record stats for a video-packet. |
| void RecordVideoPacketStats(const VideoPacket& packet); |
| @@ -113,11 +120,11 @@ class PerformanceTracker { |
| // The following running-averages are uploaded to UMA per video packet and |
| // also used for display to users, averaged over the N most recent samples. |
| // N = kLatencySampleSize. |
| - RunningAverage video_capture_ms_; |
| - RunningAverage video_encode_ms_; |
| - RunningAverage video_decode_ms_; |
| - RunningAverage video_paint_ms_; |
| - RunningAverage round_trip_ms_; |
| + RunningSamples video_capture_ms_; |
| + RunningSamples video_encode_ms_; |
| + RunningSamples video_decode_ms_; |
| + RunningSamples video_paint_ms_; |
| + RunningSamples round_trip_ms_; |
| // Used to update UMA stats, if set. |
| UpdateUmaCustomHistogramCallback uma_custom_counts_updater_; |