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

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 bandwidth histogram minimum to 0. 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') | no next file with comments »
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..28260349119e2008be2f98090562a23875a2e436 100644
--- a/remoting/client/chromoting_stats.h
+++ b/remoting/client/chromoting_stats.h
@@ -18,8 +18,27 @@ class ChromotingStats {
ChromotingStats();
virtual ~ChromotingStats();
+ // Constant used to calculate the average for rate metrics and used by the
+ // plugin for the frequency at which stats should be updated.
+ static const int kStatsUpdateFrequencyInSeconds = 1;
+
+ // The video and packet rate metrics below are updated per video packet
+ // received and then, for reporting, averaged over a 1s time-window.
+ // Bytes per second for non-empty video-packets.
RateCounter* video_bandwidth() { return &video_bandwidth_; }
+
+ // Frames per second for non-empty video-packets.
RateCounter* video_frame_rate() { return &video_frame_rate_; }
+
+ // Video packets per second, including empty video-packets.
+ // This will be greater than the frame rate, as individual frames are
+ // contained in packets, some of which might be empty (e.g. when there are no
+ // screen changes).
+ RateCounter* video_packet_rate() { return &video_packet_rate_; }
+
+ // The latency metrics below are recorded per video packet received and, for
+ // reporting, averaged over the N most recent samples.
+ // N is defined by kLatencySampleSize.
RunningAverage* video_capture_ms() { return &video_capture_ms_; }
RunningAverage* video_encode_ms() { return &video_encode_ms_; }
RunningAverage* video_decode_ms() { return &video_decode_ms_; }
@@ -29,6 +48,7 @@ class ChromotingStats {
private:
RateCounter video_bandwidth_;
RateCounter video_frame_rate_;
+ RateCounter video_packet_rate_;
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698