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

Side by Side Diff: remoting/client/chromoting_stats.cc

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: Remove unnecessary RunningAverage stats. Created 5 years, 6 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 #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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698