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..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_; |