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

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: Declare time-window constants as static. Created 5 years, 5 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.
10 const int kTimeWindow = 3;
11
12 // We take the last 10 latency numbers and report the average. 9 // We take the last 10 latency numbers and report the average.
13 const int kLatencyWindow = 10; 10 const int kLatencyWindowInSeconds = 10;
14 11
15 } // namespace 12 } // namespace
16 13
17 namespace remoting { 14 namespace remoting {
18 15
19 ChromotingStats::ChromotingStats() 16 ChromotingStats::ChromotingStats()
20 : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)), 17 : video_bandwidth_display_(
21 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), 18 base::TimeDelta::FromSeconds(kDisplayStatsRateWindowInSeconds)),
22 video_capture_ms_(kLatencyWindow), 19 video_frame_rate_display_(
23 video_encode_ms_(kLatencyWindow), 20 base::TimeDelta::FromSeconds(kDisplayStatsRateWindowInSeconds)),
24 video_decode_ms_(kLatencyWindow), 21 video_bandwidth_uma_(
25 video_paint_ms_(kLatencyWindow), 22 base::TimeDelta::FromSeconds(kUMAStatsTimeWindowInSeconds)),
26 round_trip_ms_(kLatencyWindow) { 23 video_frame_rate_uma_(
24 base::TimeDelta::FromSeconds(kUMAStatsTimeWindowInSeconds)),
25 video_packet_rate_uma_(
26 base::TimeDelta::FromSeconds(kUMAStatsTimeWindowInSeconds)),
27 video_capture_ms_(kLatencyWindowInSeconds),
28 video_encode_ms_(kLatencyWindowInSeconds),
29 video_decode_ms_(kLatencyWindowInSeconds),
30 video_paint_ms_(kLatencyWindowInSeconds),
31 round_trip_ms_(kLatencyWindowInSeconds) {
27 } 32 }
28 33
29 ChromotingStats::~ChromotingStats() { 34 ChromotingStats::~ChromotingStats() {
30 } 35 }
31 36
32 } // namespace remoting 37 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698