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

Unified Diff: remoting/webapp/base/js/connection_stats.js

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/chromoting_event.js ('k') | remoting/webapp/base/js/session_logger.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/connection_stats.js
diff --git a/remoting/webapp/base/js/connection_stats.js b/remoting/webapp/base/js/connection_stats.js
index c78c24414527a651d901c0be18ffef777a607c08..d08a5270bd6c444f3e3601af572b7c83aac85210 100644
--- a/remoting/webapp/base/js/connection_stats.js
+++ b/remoting/webapp/base/js/connection_stats.js
@@ -123,36 +123,23 @@
/**
* @param {number} value
* @param {string} units
- * @param {number} number of digits after decimal.
* @return {string} Formatted number.
*/
- function formatStatNumber(value, units, digits) {
+ function formatStatNumber(value, units) {
if (value != undefined) {
- return value.toFixed(digits) + ' ' + units;
+ return value.toFixed(2) + ' ' + units;
} else {
return "n/a";
}
}
- /**
- * @param {string} type
- * @param {number} avg
- * @param {number} max
- * @return {string} "type: avg, max; " e.g. "RTT: 8.0, 13; "
- */
- function formatStat(type, avg, max) {
- return type + ': ' + avg.toFixed(1) + ', ' + max + '; ';
- }
-
var statistics = document.getElementById('statistics');
this.statsElement_.innerText = (
- '(avg, max in ms) ' +
- formatStat('Capture', stats.captureLatency, stats.maxCaptureLatency) +
- formatStat('Encode', stats.encodeLatency, stats.maxEncodeLatency) +
- formatStat('Decode', stats.decodeLatency, stats.maxDecodeLatency) +
- formatStat('Render', stats.renderLatency, stats.maxRenderLatency) +
- formatStat('RTT', stats.roundtripLatency, stats.maxRoundtripLatency) +
- 'Bandwidth: ' + formatStatNumber(videoBandwidth, units, 2) + '; ' +
- 'Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps', 1)
- );
+ 'Bandwidth: ' + formatStatNumber(videoBandwidth, units) +
+ ', Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps') +
+ ', Capture: ' + formatStatNumber(stats.captureLatency, 'ms') +
+ ', Encode: ' + formatStatNumber(stats.encodeLatency, 'ms') +
+ ', Decode: ' + formatStatNumber(stats.decodeLatency, 'ms') +
+ ', Render: ' + formatStatNumber(stats.renderLatency, 'ms') +
+ ', Latency: ' + formatStatNumber(stats.roundtripLatency, 'ms'));
};
« no previous file with comments | « remoting/webapp/base/js/chromoting_event.js ('k') | remoting/webapp/base/js/session_logger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698