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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <nacl_io/nacl_io.h> 7 #include <nacl_io/nacl_io.h>
8 #include <sys/mount.h> 8 #include <sys/mount.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1030
1031 void ChromotingInstance::UpdatePerfStatsInUI() { 1031 void ChromotingInstance::UpdatePerfStatsInUI() {
1032 // Fetch performance stats from the VideoRenderer and send them to the client 1032 // Fetch performance stats from the VideoRenderer and send them to the client
1033 // for display to users. 1033 // for display to users.
1034 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); 1034 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
1035 data->SetDouble("videoBandwidth", perf_tracker_.video_bandwidth()); 1035 data->SetDouble("videoBandwidth", perf_tracker_.video_bandwidth());
1036 data->SetDouble("videoFrameRate", perf_tracker_.video_frame_rate()); 1036 data->SetDouble("videoFrameRate", perf_tracker_.video_frame_rate());
1037 data->SetDouble("captureLatency", perf_tracker_.video_capture_ms()); 1037 data->SetDouble("captureLatency", perf_tracker_.video_capture_ms());
1038 data->SetDouble("encodeLatency", perf_tracker_.video_encode_ms()); 1038 data->SetDouble("encodeLatency", perf_tracker_.video_encode_ms());
1039 data->SetDouble("decodeLatency", perf_tracker_.video_decode_ms()); 1039 data->SetDouble("decodeLatency", perf_tracker_.video_decode_ms());
1040 data->SetDouble("renderLatency", perf_tracker_.video_paint_ms()); 1040 data->SetDouble("renderLatency", perf_tracker_.video_paint_ms());
Sergey Ulanov 2016/03/17 19:12:37 I think ideally we want to have max values for al
Yuwei 2016/03/17 20:24:44 so we will have *Latency for average latency and m
Yuwei 2016/03/17 22:00:38 We can have max values for all latencies but we pr
1041 data->SetDouble("roundtripLatency", perf_tracker_.round_trip_ms()); 1041 data->SetDouble("roundtripLatency", perf_tracker_.round_trip_ms());
1042 data->SetDouble("maxRoundtripLatency", perf_tracker_.max_round_trip_ms());
1042 PostLegacyJsonMessage("onPerfStats", std::move(data)); 1043 PostLegacyJsonMessage("onPerfStats", std::move(data));
1043 } 1044 }
1044 1045
1045 // static 1046 // static
1046 void ChromotingInstance::RegisterLogMessageHandler() { 1047 void ChromotingInstance::RegisterLogMessageHandler() {
1047 base::AutoLock lock(g_logging_lock.Get()); 1048 base::AutoLock lock(g_logging_lock.Get());
1048 1049
1049 // Set up log message handler. 1050 // Set up log message handler.
1050 // This is not thread-safe so we need it within our lock. 1051 // This is not thread-safe so we need it within our lock.
1051 logging::SetLogMessageHandler(&LogToUI); 1052 logging::SetLogMessageHandler(&LogToUI);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 if (is_custom_counts_histogram) { 1133 if (is_custom_counts_histogram) {
1133 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1134 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1134 histogram_max, histogram_buckets); 1135 histogram_max, histogram_buckets);
1135 } else { 1136 } else {
1136 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1137 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1137 histogram_max, histogram_buckets); 1138 histogram_max, histogram_buckets);
1138 } 1139 }
1139 } 1140 }
1140 1141
1141 } // namespace remoting 1142 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698