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

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: Clarify metric names. Better document UMA min-max and boundary settings. 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/chromoting_stats.cc
diff --git a/remoting/client/chromoting_stats.cc b/remoting/client/chromoting_stats.cc
index 71b7199ff5adca1f9222636bb5cc5fe79efedea8..1adbf64dbf43b2dd19edb078b1e2c7cfa882eea5 100644
--- a/remoting/client/chromoting_stats.cc
+++ b/remoting/client/chromoting_stats.cc
@@ -7,23 +7,32 @@
namespace {
// The default window of bandwidth and frame rate in seconds.
-const int kTimeWindow = 3;
+// This is used for obtaining rates over the specified window for reporting to
+// users in the web-app.
+const int kWebAppStatsTimeWindow = 3;
Sergey Ulanov 2015/07/06 21:23:12 I suggest calling it kDisplayStatsTimeWindowSecond
anandc 2015/07/07 01:11:43 Done.
+
+// Window for more fine-grained stats
+const int kFineGrainedStatsWindow = 1;
Sergey Ulanov 2015/07/06 21:23:12 kUmaStatsWindowSeconds
Sergey Ulanov 2015/07/06 21:23:12 This value is essentially duplicated in as kPerfSt
anandc 2015/07/07 01:11:42 Done.
anandc 2015/07/07 01:11:43 Done.
// We take the last 10 latency numbers and report the average.
-const int kLatencyWindow = 10;
+const int kLatencyWindowInSeconds = 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_Bps_webapp_(base::TimeDelta::FromSeconds(kWebAppStatsTimeWindow)),
+ video_fps_webapp_(base::TimeDelta::FromSeconds(kWebAppStatsTimeWindow)),
+ video_Bps_UMA_(base::TimeDelta::FromSeconds(kFineGrainedStatsWindow)),
+ video_fps_UMA_(base::TimeDelta::FromSeconds(kFineGrainedStatsWindow)),
+ video_packets_per_s_UMA_(
+ base::TimeDelta::FromSeconds(kFineGrainedStatsWindow)),
+ video_capture_ms_(kLatencyWindowInSeconds),
+ video_encode_ms_(kLatencyWindowInSeconds),
+ video_decode_ms_(kLatencyWindowInSeconds),
+ video_paint_ms_(kLatencyWindowInSeconds),
+ round_trip_ms_(kLatencyWindowInSeconds) {
}
ChromotingStats::~ChromotingStats() {

Powered by Google App Engine
This is Rietveld 408576698