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

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: 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 unified diff | Download patch
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 // Constant used to calculate the average for rate metrics and used by the
21 // plugin for the frequency at which stats should be updated.
22 static const int kStatsUpdateFrequencyInSeconds = 1;
20 23
24 // The video and packet rate metrics below are updated per video packet
25 // received and then, for reporting, averaged over a 1s time-window.
26 // 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.
21 RateCounter* video_bandwidth() { return &video_bandwidth_; } 27 RateCounter* video_bandwidth() { return &video_bandwidth_; }
28 // 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.
22 RateCounter* video_frame_rate() { return &video_frame_rate_; } 29 RateCounter* video_frame_rate() { return &video_frame_rate_; }
30 // 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.
31 RateCounter* video_packet_rate() { return &video_packet_rate_; }
32
33 // The latency metrics below are recorded per video packet received and, for
34 // reporting, averaged over the N most recent samples.
35 // 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.
23 RunningAverage* video_capture_ms() { return &video_capture_ms_; } 36 RunningAverage* video_capture_ms() { return &video_capture_ms_; }
24 RunningAverage* video_encode_ms() { return &video_encode_ms_; } 37 RunningAverage* video_encode_ms() { return &video_encode_ms_; }
25 RunningAverage* video_decode_ms() { return &video_decode_ms_; } 38 RunningAverage* video_decode_ms() { return &video_decode_ms_; }
26 RunningAverage* video_paint_ms() { return &video_paint_ms_; } 39 RunningAverage* video_paint_ms() { return &video_paint_ms_; }
27 RunningAverage* round_trip_ms() { return &round_trip_ms_; } 40 RunningAverage* round_trip_ms() { return &round_trip_ms_; }
28 41
29 private: 42 private:
30 RateCounter video_bandwidth_; 43 RateCounter video_bandwidth_;
31 RateCounter video_frame_rate_; 44 RateCounter video_frame_rate_;
45 RateCounter video_packet_rate_;
32 RunningAverage video_capture_ms_; 46 RunningAverage video_capture_ms_;
33 RunningAverage video_encode_ms_; 47 RunningAverage video_encode_ms_;
34 RunningAverage video_decode_ms_; 48 RunningAverage video_decode_ms_;
35 RunningAverage video_paint_ms_; 49 RunningAverage video_paint_ms_;
36 RunningAverage round_trip_ms_; 50 RunningAverage round_trip_ms_;
37 51
38 DISALLOW_COPY_AND_ASSIGN(ChromotingStats); 52 DISALLOW_COPY_AND_ASSIGN(ChromotingStats);
39 }; 53 };
40 54
41 } // namespace remoting 55 } // namespace remoting
42 56
43 #endif // REMOTING_CLIENT_CHROMOTING_STATS_H_ 57 #endif // REMOTING_CLIENT_CHROMOTING_STATS_H_
OLDNEW
« 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