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

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: Note frequency at which UMA stats are being updated/logged. 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 kLatencySampleSize = 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_(
21 video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)), 18 base::TimeDelta::FromSeconds(kStatsUpdateFrequencyInSeconds)),
22 video_capture_ms_(kLatencyWindow), 19 video_frame_rate_(
23 video_encode_ms_(kLatencyWindow), 20 base::TimeDelta::FromSeconds(kStatsUpdateFrequencyInSeconds)),
24 video_decode_ms_(kLatencyWindow), 21 video_packet_rate_(
25 video_paint_ms_(kLatencyWindow), 22 base::TimeDelta::FromSeconds(kStatsUpdateFrequencyInSeconds)),
26 round_trip_ms_(kLatencyWindow) { 23 video_capture_ms_(kLatencySampleSize),
24 video_encode_ms_(kLatencySampleSize),
25 video_decode_ms_(kLatencySampleSize),
26 video_paint_ms_(kLatencySampleSize),
27 round_trip_ms_(kLatencySampleSize) {
27 } 28 }
28 29
29 ChromotingStats::~ChromotingStats() { 30 ChromotingStats::~ChromotingStats() {
30 } 31 }
31 32
32 } // namespace remoting 33 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698