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 #include "remoting/client/chromoting_stats.h" | 5 #include "remoting/client/chromoting_stats.h" |
6 | 6 |
7 namespace { | 7 namespace { |
8 | 8 |
9 // The default window of bandwidth and frame rate in seconds. | 9 // The default window of bandwidth and frame rate in seconds. |
10 const int kTimeWindow = 3; | 10 // This is used for obtaining rates over the specified window for reporting to |
11 // users in the web-app. | |
12 const int kWebAppStatsTimeWindow = 3; | |
Sergey Ulanov
2015/07/06 21:23:12
I suggest calling it kDisplayStatsTimeWindowSecond
anandc
2015/07/07 01:11:43
Done.
| |
13 | |
14 // Window for more fine-grained stats | |
15 const int kFineGrainedStatsWindow = 1; | |
Sergey Ulanov
2015/07/06 21:23:12
kUmaStatsWindowSeconds
Sergey Ulanov
2015/07/06 21:23:12
This value is essentially duplicated in as kPerfSt
anandc
2015/07/07 01:11:42
Done.
anandc
2015/07/07 01:11:43
Done.
| |
11 | 16 |
12 // We take the last 10 latency numbers and report the average. | 17 // We take the last 10 latency numbers and report the average. |
13 const int kLatencyWindow = 10; | 18 const int kLatencyWindowInSeconds = 10; |
14 | 19 |
15 } // namespace | 20 } // namespace |
16 | 21 |
17 namespace remoting { | 22 namespace remoting { |
18 | 23 |
19 ChromotingStats::ChromotingStats() | 24 ChromotingStats::ChromotingStats() |
20 : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)), | 25 : video_Bps_webapp_(base::TimeDelta::FromSeconds(kWebAppStatsTimeWindow)), |
21 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), | 26 video_fps_webapp_(base::TimeDelta::FromSeconds(kWebAppStatsTimeWindow)), |
22 video_capture_ms_(kLatencyWindow), | 27 video_Bps_UMA_(base::TimeDelta::FromSeconds(kFineGrainedStatsWindow)), |
23 video_encode_ms_(kLatencyWindow), | 28 video_fps_UMA_(base::TimeDelta::FromSeconds(kFineGrainedStatsWindow)), |
24 video_decode_ms_(kLatencyWindow), | 29 video_packets_per_s_UMA_( |
25 video_paint_ms_(kLatencyWindow), | 30 base::TimeDelta::FromSeconds(kFineGrainedStatsWindow)), |
26 round_trip_ms_(kLatencyWindow) { | 31 video_capture_ms_(kLatencyWindowInSeconds), |
32 video_encode_ms_(kLatencyWindowInSeconds), | |
33 video_decode_ms_(kLatencyWindowInSeconds), | |
34 video_paint_ms_(kLatencyWindowInSeconds), | |
35 round_trip_ms_(kLatencyWindowInSeconds) { | |
27 } | 36 } |
28 | 37 |
29 ChromotingStats::~ChromotingStats() { | 38 ChromotingStats::~ChromotingStats() { |
30 } | 39 } |
31 | 40 |
32 } // namespace remoting | 41 } // namespace remoting |
OLD | NEW |