diff options
author | newt <newt@chromium.org> | 2016-03-22 19:56:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 02:58:42 +0000 |
commit | 53300ca20e00981cc46a30395a635246d154ddd3 (patch) | |
tree | 625a9c68ea0ff3c2d4fc7adf167f3b610057840c /remoting/webapp/base/js/connection_stats.js | |
parent | 24994728bb74a3ef84b84db0c6d9f45e5d410274 (diff) | |
download | chromium_src-53300ca20e00981cc46a30395a635246d154ddd3.zip chromium_src-53300ca20e00981cc46a30395a635246d154ddd3.tar.gz chromium_src-53300ca20e00981cc46a30395a635246d154ddd3.tar.bz2 |
Revert of Show max latency on client's status bar (patchset #8 id:140001 of https://codereview.chromium.org/1811833002/ )
Reason for revert:
Caused compile failure on 64-bit Android bots. See crbug.com/597155
Original issue's description:
> Show max latency on client's status bar
>
> Will later also consider storing max latency data in server
>
> BUG=560950
>
> Committed: https://crrev.com/e37a467453f3814a9ecb0eb6769bd7c58b61cbae
> Cr-Commit-Position: refs/heads/master@{#382663}
TBR=sergeyu@chromium.org,kelvinp@chromium.org,dbeam@chromium.org,yuweih@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=560950
Review URL: https://codereview.chromium.org/1817093005
Cr-Commit-Position: refs/heads/master@{#382777}
Diffstat (limited to 'remoting/webapp/base/js/connection_stats.js')
-rw-r--r-- | remoting/webapp/base/js/connection_stats.js | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/remoting/webapp/base/js/connection_stats.js b/remoting/webapp/base/js/connection_stats.js index c78c244..d08a527 100644 --- a/remoting/webapp/base/js/connection_stats.js +++ b/remoting/webapp/base/js/connection_stats.js @@ -123,36 +123,23 @@ remoting.ConnectionStats.prototype.update = function(stats) { /** * @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')); }; |