Chromium Code Reviews| Index: remoting/client/chromoting_stats.h |
| diff --git a/remoting/client/chromoting_stats.h b/remoting/client/chromoting_stats.h |
| index da7601b7f9222d3026fe768713db067a8a4c0b78..edce7f68e3c0cd52c4d92581c7243a4b77d5f5b1 100644 |
| --- a/remoting/client/chromoting_stats.h |
| +++ b/remoting/client/chromoting_stats.h |
| @@ -18,17 +18,49 @@ class ChromotingStats { |
| ChromotingStats(); |
| virtual ~ChromotingStats(); |
| - RateCounter* video_bandwidth() { return &video_bandwidth_; } |
| - RateCounter* video_frame_rate() { return &video_frame_rate_; } |
| + // Window for UMA stats updates and rate-counters. |
| + const int kUMAStatsTimeWindowInSeconds = 1; |
|
Sergey Ulanov
2015/07/08 20:06:47
declare these are static const.
anandc
2015/07/08 22:43:34
Done.
|
| + // The time-window for display-stats rate-counters. |
| + const int kDisplayStatsRateWindowInSeconds = 3; |
| + // The time interval for updating display stats. |
| + const int kDisplayStatsUpdateWindowInSeconds = 60; |
| + |
| + // The following 2 metrics are used in the stats captured every 60s for |
| + // display to users. |
| + // Bytes/sec for non-empty packets, measured over a 1s time-window. |
| + RateCounter* video_bandwidth_display() { return &video_bandwidth_display_; } |
| + // frames/sec for non-empty video-packets, measured over a 1s time-window. |
| + RateCounter* video_frame_rate_display() { return &video_frame_rate_display_; } |
| + |
| + // The next 3 metrics are used to record statistics for upload to UMA. |
| + // Bytes/sec for non-empty video-packets, measured over a 1s time-window. |
| + RateCounter* video_bandwidth_uma() { return &video_bandwidth_uma_; } |
| + // frames/sec for non-empty video-packets, measured over a 1s time-window. |
| + RateCounter* video_frame_rate_uma() { return &video_frame_rate_uma_; } |
| + // packets/sec, including empty video-packets, measured over a 1s time-window. |
| + |
| + RateCounter* video_packet_rate_uma() { return &video_packet_rate_uma_; } |
| + |
| + // The following metrics report averages calculated when updating stats. |
| + // For UMA, the updates occur every second. For stats shown to users, they are |
| + // updated every 60s. |
| + // Time to capture video. |
| RunningAverage* video_capture_ms() { return &video_capture_ms_; } |
| + // Time to encode a captured video-packet. |
| RunningAverage* video_encode_ms() { return &video_encode_ms_; } |
| + // Time to decode a video-packet. |
| RunningAverage* video_decode_ms() { return &video_decode_ms_; } |
| + // Time to paint, if there is a picture to paint or on force-repaint. |
| RunningAverage* video_paint_ms() { return &video_paint_ms_; } |
| + // Round-trip latency. |
| RunningAverage* round_trip_ms() { return &round_trip_ms_; } |
| private: |
| - RateCounter video_bandwidth_; |
| - RateCounter video_frame_rate_; |
| + RateCounter video_bandwidth_display_; |
| + RateCounter video_frame_rate_display_; |
| + RateCounter video_bandwidth_uma_; |
| + RateCounter video_frame_rate_uma_; |
| + RateCounter video_packet_rate_uma_; |
| RunningAverage video_capture_ms_; |
| RunningAverage video_encode_ms_; |
| RunningAverage video_decode_ms_; |