You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2013/01/16 16:29:27 UTC
spec commit: Make ArrayBuffer benchmark in bytes,
and wrap calls with setTimeout
Updated Branches:
refs/heads/master 794d58346 -> 0c97fb3eb
Make ArrayBuffer benchmark in bytes, and wrap calls with setTimeout
Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/0c97fb3e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/0c97fb3e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/0c97fb3e
Branch: refs/heads/master
Commit: 0c97fb3eb124f8277fd5e3145c4c3b22833fefbe
Parents: 794d583
Author: Michal Mocny <mm...@gmail.com>
Authored: Wed Jan 16 10:28:16 2013 -0500
Committer: Michal Mocny <mm...@gmail.com>
Committed: Wed Jan 16 10:28:59 2013 -0500
----------------------------------------------------------------------
execbenchmark/arraybuffer.html | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/0c97fb3e/execbenchmark/arraybuffer.html
----------------------------------------------------------------------
diff --git a/execbenchmark/arraybuffer.html b/execbenchmark/arraybuffer.html
index d8fbe6a..516f66e 100644
--- a/execbenchmark/arraybuffer.html
+++ b/execbenchmark/arraybuffer.html
@@ -48,7 +48,7 @@
startTime = +new Date,
callCount = 0,
durationMs = parseInt(document.getElementById('test-duration').value, 10) * 1000,
- payloadSize = (+document.getElementById('payload-size').value) * 100,
+ payloadSize = (+document.getElementById('payload-size').value),
payload = new ArrayBuffer(payloadSize);
var payloadView = new Uint8Array(payload);
@@ -87,7 +87,9 @@
appLog('Call failed!');
}
function echoMessage() {
- echo(win, fail, payload); // TODO: test setTimeout
+ setTimeout(function() {
+ echo(win, fail, payload);
+ });
}
appLog('Started exec benchmark with payload length: ' + payloadView.length);
@@ -120,7 +122,7 @@
<fieldset>
<legend>Settings</legend>
<label>Test Duration: <select id="test-duration"><option>1 Second</option><option>5 Seconds</option></select><br></label>
- <label>Payload size (in 100s of bytes) <input id="payload-size" value="5" style="width:100px"></label><br>
+ <label>Payload size (in bytes) <input id="payload-size" value="1024" style="width:100px"></label><br>
<button onclick="benchExec()">Benchmark exec</button><br>
</fieldset>
<h2> </h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a><br>