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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1817093005: Revert of 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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 data->SetString("iq", iq); 1027 data->SetString("iq", iq);
1028 PostLegacyJsonMessage("sendOutgoingIq", std::move(data)); 1028 PostLegacyJsonMessage("sendOutgoingIq", std::move(data));
1029 } 1029 }
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().Average()); 1037 data->SetDouble("captureLatency", perf_tracker_.video_capture_ms());
1038 data->SetDouble("maxCaptureLatency", perf_tracker_.video_capture_ms().Max()); 1038 data->SetDouble("encodeLatency", perf_tracker_.video_encode_ms());
1039 data->SetDouble("encodeLatency", perf_tracker_.video_encode_ms().Average()); 1039 data->SetDouble("decodeLatency", perf_tracker_.video_decode_ms());
1040 data->SetDouble("maxEncodeLatency", perf_tracker_.video_encode_ms().Max()); 1040 data->SetDouble("renderLatency", perf_tracker_.video_paint_ms());
1041 data->SetDouble("decodeLatency", perf_tracker_.video_decode_ms().Average()); 1041 data->SetDouble("roundtripLatency", perf_tracker_.round_trip_ms());
1042 data->SetDouble("maxDecodeLatency", perf_tracker_.video_decode_ms().Max());
1043 data->SetDouble("renderLatency", perf_tracker_.video_paint_ms().Average());
1044 data->SetDouble("maxRenderLatency", perf_tracker_.video_paint_ms().Max());
1045 data->SetDouble("roundtripLatency", perf_tracker_.round_trip_ms().Average());
1046 data->SetDouble("maxRoundtripLatency", perf_tracker_.round_trip_ms().Max());
1047 PostLegacyJsonMessage("onPerfStats", std::move(data)); 1042 PostLegacyJsonMessage("onPerfStats", std::move(data));
1048 } 1043 }
1049 1044
1050 // static 1045 // static
1051 void ChromotingInstance::RegisterLogMessageHandler() { 1046 void ChromotingInstance::RegisterLogMessageHandler() {
1052 base::AutoLock lock(g_logging_lock.Get()); 1047 base::AutoLock lock(g_logging_lock.Get());
1053 1048
1054 // Set up log message handler. 1049 // Set up log message handler.
1055 // This is not thread-safe so we need it within our lock. 1050 // This is not thread-safe so we need it within our lock.
1056 logging::SetLogMessageHandler(&LogToUI); 1051 logging::SetLogMessageHandler(&LogToUI);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 if (is_custom_counts_histogram) { 1132 if (is_custom_counts_histogram) {
1138 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1133 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1139 histogram_max, histogram_buckets); 1134 histogram_max, histogram_buckets);
1140 } else { 1135 } else {
1141 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1136 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1142 histogram_max, histogram_buckets); 1137 histogram_max, histogram_buckets);
1143 } 1138 }
1144 } 1139 }
1145 1140
1146 } // namespace remoting 1141 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/server_log_entry_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698