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 // Set to 60s, so that we average at 60s intervals, same as the rate at which we |
Sergey Ulanov
2015/06/19 23:08:42
Actually ChromotingInstance::SendPerfStats() is ca
anandc
2015/06/20 01:31:32
OK. Created rate counters for fps and bytes/sec, a
| |
11 // log stats. | |
12 const int kTimeWindow = 60; | |
Sergey Ulanov
2015/06/19 23:08:42
I don't think we want to changed that - it's usefu
anandc
2015/06/20 01:31:32
Done.
| |
11 | 13 |
12 // We take the last 10 latency numbers and report the average. | 14 // We take the last 10 latency numbers and report the average. |
13 const int kLatencyWindow = 10; | 15 const int kLatencyWindow = 10; |
14 | 16 |
15 } // namespace | 17 } // namespace |
16 | 18 |
17 namespace remoting { | 19 namespace remoting { |
18 | 20 |
19 ChromotingStats::ChromotingStats() | 21 ChromotingStats::ChromotingStats() |
20 : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)), | 22 : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)), |
21 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), | 23 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), |
22 video_capture_ms_(kLatencyWindow), | 24 video_capture_ms_(kLatencyWindow), |
23 video_encode_ms_(kLatencyWindow), | 25 video_encode_ms_(kLatencyWindow), |
24 video_decode_ms_(kLatencyWindow), | 26 video_decode_ms_(kLatencyWindow), |
25 video_paint_ms_(kLatencyWindow), | 27 video_paint_ms_(kLatencyWindow), |
26 round_trip_ms_(kLatencyWindow) { | 28 round_trip_ms_(kLatencyWindow) { |
27 } | 29 } |
28 | 30 |
29 ChromotingStats::~ChromotingStats() { | 31 ChromotingStats::~ChromotingStats() { |
30 } | 32 } |
31 | 33 |
32 } // namespace remoting | 34 } // namespace remoting |
OLD | NEW |