Chromium Code Reviews| 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 const int kTimeWindow = 3; |
|
Wez
2015/06/29 14:56:13
nit: Rename this to clarify why it differs from th
anandc
2015/06/30 20:17:38
Done.
| |
| 11 | 11 |
| 12 // Window for more fine-grained stats | |
| 13 const int kOneSecWindow = 1; | |
|
Wez
2015/06/29 14:56:13
Don't name this after the actual amount it represe
anandc
2015/06/30 20:17:38
Done. Thanks. :-)
| |
| 14 | |
| 12 // We take the last 10 latency numbers and report the average. | 15 // We take the last 10 latency numbers and report the average. |
| 13 const int kLatencyWindow = 10; | 16 const int kLatencyWindow = 10; |
|
Wez
2015/06/29 14:56:13
nit: Rename this to include the units in the name?
anandc
2015/06/30 20:17:38
Done.
| |
| 14 | 17 |
| 15 } // namespace | 18 } // namespace |
| 16 | 19 |
| 17 namespace remoting { | 20 namespace remoting { |
| 18 | 21 |
| 19 ChromotingStats::ChromotingStats() | 22 ChromotingStats::ChromotingStats() |
| 20 : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)), | 23 : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)), |
| 21 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), | 24 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), |
| 25 video_fps_(base::TimeDelta::FromSeconds(kOneSecWindow)), | |
| 26 video_bytes_per_s_(base::TimeDelta::FromSeconds(kOneSecWindow)), | |
| 27 video_fps_with_empty_frames_(base::TimeDelta::FromSeconds(kOneSecWindow)), | |
| 22 video_capture_ms_(kLatencyWindow), | 28 video_capture_ms_(kLatencyWindow), |
| 23 video_encode_ms_(kLatencyWindow), | 29 video_encode_ms_(kLatencyWindow), |
| 24 video_decode_ms_(kLatencyWindow), | 30 video_decode_ms_(kLatencyWindow), |
| 25 video_paint_ms_(kLatencyWindow), | 31 video_paint_ms_(kLatencyWindow), |
| 26 round_trip_ms_(kLatencyWindow) { | 32 round_trip_ms_(kLatencyWindow) { |
| 27 } | 33 } |
| 28 | 34 |
| 29 ChromotingStats::~ChromotingStats() { | 35 ChromotingStats::~ChromotingStats() { |
| 30 } | 36 } |
| 31 | 37 |
| 32 } // namespace remoting | 38 } // namespace remoting |
| OLD | NEW |