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

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: Note frequency at which UMA stats are being updated/logged. 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..bf460c7bfd8f6608d788c1b9136cba7f631394e3 100644
--- a/remoting/client/chromoting_stats.h
+++ b/remoting/client/chromoting_stats.h
@@ -17,9 +17,22 @@ class ChromotingStats {
public:
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/sec for non-empty video-packets.
Wez 2015/07/14 20:24:16 nit: Bytes per second
anandc 2015/07/15 03:59:54 Done.
RateCounter* video_bandwidth() { return &video_bandwidth_; }
+ // frames/sec for non-empty video-packets.
Wez 2015/07/14 20:24:15 nit: Frames per second
anandc 2015/07/15 03:59:54 Done.
RateCounter* video_frame_rate() { return &video_frame_rate_; }
+ // packets/sec, including empty video-packets.
Wez 2015/07/14 20:24:16 nit: Video packets per second You might also clar
anandc 2015/07/15 03:59:54 Done.
+ 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.
Wez 2015/07/14 20:24:15 Why not fix these to average over a fixed time, e.
anandc 2015/07/15 03:59:54 Good suggestion. Here are 2 ways to do that: chan
Wez 2015/07/16 19:03:35 Doing it in the follow-up SGTM. I'd prefer that w
anandc 2015/07/16 20:18:47 Yes, that would work. Thanks.
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 +42,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') | remoting/client/plugin/chromoting_instance.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698