Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: remoting/client/chromoting_stats.h

Issue 1181743005: Report video and network stats averaged over 1s, and create corresponding UMA metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set time-window for display stats rate-counters to 3. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/client/chromoting_stats.cc » ('j') | remoting/client/plugin/chromoting_instance.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | remoting/client/chromoting_stats.cc » ('j') | remoting/client/plugin/chromoting_instance.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698