[Pkg-javascript-commits] [node-acorn-jsx] 54/484: Add an acorn-only button to bench.html
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-acorn-jsx.
commit 4c650ad16bb3da1b4436c98673863e6724666b85
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Tue Nov 20 16:54:11 2012 +0100
Add an acorn-only button to bench.html
---
test/bench.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/bench.html b/test/bench.html
index 4266268..59c9fa2 100644
--- a/test/bench.html
+++ b/test/bench.html
@@ -31,6 +31,7 @@ numbers.</p>
<button onclick="run(false)">Compare <strong>without</strong> location data</button>
<button onclick="run(true)">Compare <strong>with</strong> location data</button>
+<button onclick="run(false, true)">Run only Acorn</button>
<span id="running"></span>
<script>
@@ -69,12 +70,13 @@ numbers.</p>
document.body.appendChild(document.createElement("div")).innerHTML = html;
}
- function run(locations) {
+ function run(locations, acornOnly) {
var running = document.getElementById("running");
running.innerHTML = "Running benchmark...";
var data = [{name: "Acorn", runner: runAcorn},
{name: "Esprima", runner: runEsprima},
{name: "UglifyJS2", runner: runUglifyJS}];
+ if (acornOnly) data.length = 1;
var pos = 0;
function next() {
data[pos].score = benchmark(data[pos].runner, locations);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git
More information about the Pkg-javascript-commits
mailing list