summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 17:09:44 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 17:09:44 +0000
commitd5d080547d562a5f37e854dac468ff71ae46c4f3 (patch)
tree41aab697d893b921c0729b544542e17d43a4e537 /remoting
parent06a828805d8562ac84c3542286492273998ad677 (diff)
downloadchromium_src-d5d080547d562a5f37e854dac468ff71ae46c4f3.zip
chromium_src-d5d080547d562a5f37e854dac468ff71ae46c4f3.tar.gz
chromium_src-d5d080547d562a5f37e854dac468ff71ae46c4f3.tar.bz2
Get remoting units working correctly.
And make them easier to read. BUG=NONE TEST=Run remoting. Review URL: http://codereview.chromium.org/6992069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/me2mom/remoting_session.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/remoting/webapp/me2mom/remoting_session.js b/remoting/webapp/me2mom/remoting_session.js
index 1a2629e..934b229 100644
--- a/remoting/webapp/me2mom/remoting_session.js
+++ b/remoting/webapp/me2mom/remoting_session.js
@@ -307,8 +307,22 @@ function updateStatusBarStats() {
var videoDecodeLatency = remoting.plugin.videoDecodeLatency;
var videoRenderLatency = remoting.plugin.videoRenderLatency;
+ var units = '';
+ if (videoBandwidth < 1024) {
+ units = 'Bps';
+ } else if (videoBandwidth < 1048576) {
+ units = 'KBps';
+ videoBandwidth = videoBandwidth / 1024;
+ } else if (videoBandwidth < 1073741824) {
+ units = 'MBps';
+ videoBandwidth = videoBandwidth / 1048576;
+ } else {
+ units = 'GBps';
+ videoBandwidth = videoBandwidth / 1073741824;
+ }
+
setClientStateMessage(
- 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + 'Kbps' +
+ 'Video stats: bandwidth: ' + videoBandwidth.toFixed(2) + units +
', Latency: capture: ' + videoCaptureLatency.toFixed(2) + 'ms' +
', encode: ' + videoEncodeLatency.toFixed(2) + 'ms' +
', decode: ' + videoDecodeLatency.toFixed(2) + 'ms' +