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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1811833002: Show max latency on client's status bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Client code for uploading stats to telemetry server Created 4 years, 9 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/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index e0ca0d5b045568f7917c59bf237c27d80253d890..92a1bcd0994ad56e99794ee89e6e37ef5adc2b9f 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -1034,11 +1034,16 @@ void ChromotingInstance::UpdatePerfStatsInUI() {
scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
data->SetDouble("videoBandwidth", perf_tracker_.video_bandwidth());
data->SetDouble("videoFrameRate", perf_tracker_.video_frame_rate());
- data->SetDouble("captureLatency", perf_tracker_.video_capture_ms());
- data->SetDouble("encodeLatency", perf_tracker_.video_encode_ms());
- data->SetDouble("decodeLatency", perf_tracker_.video_decode_ms());
- data->SetDouble("renderLatency", perf_tracker_.video_paint_ms());
- data->SetDouble("roundtripLatency", perf_tracker_.round_trip_ms());
+ data->SetDouble("captureLatency", perf_tracker_.video_capture_ms().Average());
+ data->SetDouble("encodeLatency", perf_tracker_.video_encode_ms().Average());
+ data->SetDouble("decodeLatency", perf_tracker_.video_decode_ms().Average());
+ data->SetDouble("renderLatency", perf_tracker_.video_paint_ms().Average());
+ data->SetDouble("roundtripLatency", perf_tracker_.round_trip_ms().Average());
+ data->SetDouble("maxCaptureLatency", perf_tracker_.video_capture_ms().Max());
Sergey Ulanov 2016/03/21 19:35:06 maybe reorder these so max is always after average
Yuwei 2016/03/21 19:59:40 Sure. Then duplicating lines will be easier
+ data->SetDouble("maxEncodeLatency", perf_tracker_.video_encode_ms().Max());
+ data->SetDouble("maxDecodeLatency", perf_tracker_.video_decode_ms().Max());
+ data->SetDouble("maxRenderLatency", perf_tracker_.video_paint_ms().Max());
+ data->SetDouble("maxRoundtripLatency", perf_tracker_.round_trip_ms().Max());
PostLegacyJsonMessage("onPerfStats", std::move(data));
}

Powered by Google App Engine
This is Rietveld 408576698