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

Side by Side 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: Clarify metric names. Better document UMA min-max and boundary settings. 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/client/chromoting_stats.cc » ('j') | remoting/client/chromoting_stats.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // ChromotingStats defines a bundle of performance counters and statistics 5 // ChromotingStats defines a bundle of performance counters and statistics
6 // for chromoting. 6 // for chromoting.
7 7
8 #ifndef REMOTING_CLIENT_CHROMOTING_STATS_H_ 8 #ifndef REMOTING_CLIENT_CHROMOTING_STATS_H_
9 #define REMOTING_CLIENT_CHROMOTING_STATS_H_ 9 #define REMOTING_CLIENT_CHROMOTING_STATS_H_
10 10
11 #include "remoting/base/rate_counter.h" 11 #include "remoting/base/rate_counter.h"
12 #include "remoting/base/running_average.h" 12 #include "remoting/base/running_average.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 class ChromotingStats { 16 class ChromotingStats {
17 public: 17 public:
18 ChromotingStats(); 18 ChromotingStats();
19 virtual ~ChromotingStats(); 19 virtual ~ChromotingStats();
20 20
21 RateCounter* video_bandwidth() { return &video_bandwidth_; } 21 RateCounter* video_Bps_webapp() { return &video_Bps_webapp_; }
Sergey Ulanov 2015/07/06 21:23:12 style guide doesn't allow mixed case names like th
anandc 2015/07/07 01:11:43 Done.
22 RateCounter* video_frame_rate() { return &video_frame_rate_; } 22 RateCounter* video_fps_webapp() { return &video_fps_webapp_; }
23 RateCounter* video_Bps_UMA() { return &video_Bps_UMA_; }
24 RateCounter* video_fps_UMA() { return &video_fps_UMA_; }
25 RateCounter* video_packets_per_s_UMA() {
Sergey Ulanov 2015/07/06 21:23:12 Maybe call it video_packet_rate_uma()?
anandc 2015/07/07 01:11:43 Done.
26 return &video_packets_per_s_UMA_;
27 }
23 RunningAverage* video_capture_ms() { return &video_capture_ms_; } 28 RunningAverage* video_capture_ms() { return &video_capture_ms_; }
24 RunningAverage* video_encode_ms() { return &video_encode_ms_; } 29 RunningAverage* video_encode_ms() { return &video_encode_ms_; }
25 RunningAverage* video_decode_ms() { return &video_decode_ms_; } 30 RunningAverage* video_decode_ms() { return &video_decode_ms_; }
26 RunningAverage* video_paint_ms() { return &video_paint_ms_; } 31 RunningAverage* video_paint_ms() { return &video_paint_ms_; }
27 RunningAverage* round_trip_ms() { return &round_trip_ms_; } 32 RunningAverage* round_trip_ms() { return &round_trip_ms_; }
28 33
29 private: 34 private:
30 RateCounter video_bandwidth_; 35 // The following 2 metrics are used in the stats captured every 60s for
Sergey Ulanov 2015/07/06 21:23:12 IMO it would be better to move put these comments
anandc 2015/07/07 01:11:43 Done.
31 RateCounter video_frame_rate_; 36 // display within the web-app.
Sergey Ulanov 2015/07/06 21:23:12 "web-app" doesn't make sense in context of android
anandc 2015/07/07 01:11:43 Done.
37 // Bytes/sec for non-empty packets, measured over a 3s time-window.
38 RateCounter video_Bps_webapp_;
39 // frames/sec for non-empty video-packets, measured over a 3s time-window.
40 RateCounter video_fps_webapp_;
41 // The next 3 metrics are used to record statistics for upload to UMA.
42 // Bytes/sec for non-empty video-packets, measured over a 1s time-window.
43 RateCounter video_Bps_UMA_;
44 // frames/sec for non-empty video-packets, measured over a 1s time-window.
45 RateCounter video_fps_UMA_;
46 // packets/sec, including empty video-packets, measured over a 1s time-window.
47 RateCounter video_packets_per_s_UMA_;
48 // The following metrics report averages calculated when updating stats.
49 // For UMA, the updates occur every second. For stats shown to users, they are
50 // updated every 60s.
51 // Time to capture video, measured in ms.
32 RunningAverage video_capture_ms_; 52 RunningAverage video_capture_ms_;
53 // Time to encode a captured video-packet, measured in ms.
Sergey Ulanov 2015/07/06 21:23:12 "measured in ms" is redundant because there is ms_
anandc 2015/07/07 01:11:43 Done.
33 RunningAverage video_encode_ms_; 54 RunningAverage video_encode_ms_;
55 // Time to decode a video-packet, measured in ms.
34 RunningAverage video_decode_ms_; 56 RunningAverage video_decode_ms_;
57 // Time to paint, measured in ms. Only updated if there is a picture to paint,
58 // or on force-repaint.
35 RunningAverage video_paint_ms_; 59 RunningAverage video_paint_ms_;
60 // Round-trip latency, measured in ms.
36 RunningAverage round_trip_ms_; 61 RunningAverage round_trip_ms_;
37 62
38 DISALLOW_COPY_AND_ASSIGN(ChromotingStats); 63 DISALLOW_COPY_AND_ASSIGN(ChromotingStats);
39 }; 64 };
40 65
41 } // namespace remoting 66 } // namespace remoting
42 67
43 #endif // REMOTING_CLIENT_CHROMOTING_STATS_H_ 68 #endif // REMOTING_CLIENT_CHROMOTING_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/chromoting_stats.cc » ('j') | remoting/client/chromoting_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698