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

Unified 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: Set bandwidth histogram minimum to 0. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/chromoting_stats.h ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/chromoting_stats.cc
diff --git a/remoting/client/chromoting_stats.cc b/remoting/client/chromoting_stats.cc
index 71b7199ff5adca1f9222636bb5cc5fe79efedea8..01c67df81751d4b9beffd41388b32c3f4dcd41d7 100644
--- a/remoting/client/chromoting_stats.cc
+++ b/remoting/client/chromoting_stats.cc
@@ -6,24 +6,25 @@
namespace {
-// The default window of bandwidth and frame rate in seconds.
-const int kTimeWindow = 3;
-
// We take the last 10 latency numbers and report the average.
-const int kLatencyWindow = 10;
+const int kLatencySampleSize = 10;
} // namespace
namespace remoting {
ChromotingStats::ChromotingStats()
- : video_bandwidth_(base::TimeDelta::FromSeconds(kTimeWindow)),
- video_frame_rate_(base::TimeDelta::FromSeconds(kTimeWindow)),
- video_capture_ms_(kLatencyWindow),
- video_encode_ms_(kLatencyWindow),
- video_decode_ms_(kLatencyWindow),
- video_paint_ms_(kLatencyWindow),
- round_trip_ms_(kLatencyWindow) {
+ : video_bandwidth_(
+ base::TimeDelta::FromSeconds(kStatsUpdateFrequencyInSeconds)),
+ video_frame_rate_(
+ base::TimeDelta::FromSeconds(kStatsUpdateFrequencyInSeconds)),
+ video_packet_rate_(
+ base::TimeDelta::FromSeconds(kStatsUpdateFrequencyInSeconds)),
+ video_capture_ms_(kLatencySampleSize),
+ video_encode_ms_(kLatencySampleSize),
+ video_decode_ms_(kLatencySampleSize),
+ video_paint_ms_(kLatencySampleSize),
+ round_trip_ms_(kLatencySampleSize) {
}
ChromotingStats::~ChromotingStats() {
« no previous file with comments | « remoting/client/chromoting_stats.h ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698