OLD | NEW |
---|---|
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_bandwidth() { return &video_bandwidth_; } |
Wez
2015/06/29 14:56:13
While you're here, can we add aunits suffix to thi
anandc
2015/06/30 20:17:39
I've used Bps, to indicate Bytes/sec.
| |
22 RateCounter* video_frame_rate() { return &video_frame_rate_; } | 22 RateCounter* video_frame_rate() { return &video_frame_rate_; } |
23 RateCounter* video_fps() { return &video_fps_; } | |
Wez
2015/06/29 14:56:13
What is the difference between this and video_fram
anandc
2015/06/30 20:17:38
Video frame-rate has a time-window of 3s. This one
| |
24 RateCounter* video_bytes_per_s() { return &video_bytes_per_s_; } | |
Wez
2015/06/29 14:56:13
Similarly, consider clarifying how this differs fr
anandc
2015/06/30 20:17:38
Done.
| |
25 RateCounter* video_fps_with_empty_frames() { | |
Wez
2015/06/29 14:56:13
There is a 1:1 correspondence between video frames
anandc
2015/06/30 20:17:38
Done.
| |
26 return &video_fps_with_empty_frames_; | |
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 RateCounter video_bandwidth_; |
31 RateCounter video_frame_rate_; | 36 RateCounter video_frame_rate_; |
37 RateCounter video_fps_; | |
38 RateCounter video_bytes_per_s_; | |
39 RateCounter video_fps_with_empty_frames_; | |
32 RunningAverage video_capture_ms_; | 40 RunningAverage video_capture_ms_; |
33 RunningAverage video_encode_ms_; | 41 RunningAverage video_encode_ms_; |
34 RunningAverage video_decode_ms_; | 42 RunningAverage video_decode_ms_; |
35 RunningAverage video_paint_ms_; | 43 RunningAverage video_paint_ms_; |
36 RunningAverage round_trip_ms_; | 44 RunningAverage round_trip_ms_; |
37 | 45 |
38 DISALLOW_COPY_AND_ASSIGN(ChromotingStats); | 46 DISALLOW_COPY_AND_ASSIGN(ChromotingStats); |
39 }; | 47 }; |
40 | 48 |
41 } // namespace remoting | 49 } // namespace remoting |
42 | 50 |
43 #endif // REMOTING_CLIENT_CHROMOTING_STATS_H_ | 51 #endif // REMOTING_CLIENT_CHROMOTING_STATS_H_ |
OLD | NEW |