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. |
Wez
2015/07/14 20:24:15
nit: Please put a blank line between comments and
anandc
2015/07/15 03:59:54
Done.
|
+ 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. |
RateCounter* video_bandwidth() { return &video_bandwidth_; } |
+ // frames/sec for non-empty video-packets. |
RateCounter* video_frame_rate() { return &video_frame_rate_; } |
+ // packets/sec, including empty video-packets. |
+ 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 +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_; |