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..2a58c0959c47a678792bcea22b99c353f63201ee 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. |
| + static const int kUMAStatsTimeWindowInSeconds = 1; |
|
Wez
2015/07/08 23:27:54
Why is this "TimeWindow" and the one below "RateWi
Wez
2015/07/08 23:42:29
nit: kUmaStats...
anandc
2015/07/09 19:17:09
Acknowledged.
anandc
2015/07/09 19:17:09
Cleaned these up.
Also added comment for why the s
|
| + // The time-window for display-stats rate-counters. |
| + static const int kDisplayStatsRateWindowInSeconds = 3; |
| + // The time interval for updating display stats. |
| + static const int kDisplayStatsUpdateWindowInSeconds = 60; |
| + |
| + // The following 2 metrics are used in the stats captured every 60s for |
| + // display to users. |
|
Wez
2015/07/08 23:27:54
Display stats are captured every second for displa
anandc
2015/07/09 19:17:09
Sorry, these were quite confusing. PTAL at latest
|
| + // 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. |
|
Wez
2015/07/08 23:27:54
You're calling this video_bandwidth_uma but then s
anandc
2015/07/09 19:17:09
Done.
|
| + 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. |
|
Wez
2015/07/08 23:27:55
This isn't true, AFAIK; these stats are updated af
Wez
2015/07/08 23:42:29
It's also misleading since these stats are average
anandc
2015/07/09 19:17:09
Acknowledged.
anandc
2015/07/09 19:17:09
Acknowledged.
|
| + // 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_; |