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

Side by Side Diff: remoting/webapp/base/js/connection_stats.js

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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Module to support debug overlay window with connection stats. 7 * Module to support debug overlay window with connection stats.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 } 121 }
122 122
123 /** 123 /**
124 * @param {number} value 124 * @param {number} value
125 * @param {string} units 125 * @param {string} units
126 * @return {string} Formatted number. 126 * @return {string} Formatted number.
127 */ 127 */
128 function formatStatNumber(value, units) { 128 function formatStatNumber(value, units) {
129 if (value != undefined) { 129 if (value != undefined) {
130 return value.toFixed(2) + ' ' + units; 130 return value.toFixed(2) + ' ' + units;
Sergey Ulanov 2016/03/17 19:12:37 Please change this to 1 instead of 2. All average
Yuwei 2016/03/17 20:24:44 Acknowledged.
131 } else { 131 } else {
132 return "n/a"; 132 return "n/a";
133 } 133 }
134 } 134 }
135 135
136 var statistics = document.getElementById('statistics'); 136 var statistics = document.getElementById('statistics');
137 this.statsElement_.innerText = ( 137 this.statsElement_.innerText = (
138 'Bandwidth: ' + formatStatNumber(videoBandwidth, units) + 138 'Bandwidth: ' + formatStatNumber(videoBandwidth, units) +
139 ', Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps') + 139 ', Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps') +
140 ', Capture: ' + formatStatNumber(stats.captureLatency, 'ms') + 140 ', Capture: ' + formatStatNumber(stats.captureLatency, 'ms') +
141 ', Encode: ' + formatStatNumber(stats.encodeLatency, 'ms') + 141 ', Encode: ' + formatStatNumber(stats.encodeLatency, 'ms') +
142 ', Decode: ' + formatStatNumber(stats.decodeLatency, 'ms') + 142 ', Decode: ' + formatStatNumber(stats.decodeLatency, 'ms') +
143 ', Render: ' + formatStatNumber(stats.renderLatency, 'ms') + 143 ', Render: ' + formatStatNumber(stats.renderLatency, 'ms') +
144 ', Latency: ' + formatStatNumber(stats.roundtripLatency, 'ms')); 144 ', Avg. Latency: ' + formatStatNumber(stats.roundtripLatency, 'ms') +
145 ', Max latency: ' + formatStatNumber(stats.maxRoundtripLatency, 'ms'));
145 }; 146 };
OLDNEW
« remoting/protocol/performance_tracker.cc ('K') | « remoting/remoting_srcs.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698