Small cleanup of benchmark/index.js

Update coding style to match the rest of PEG.js.
redux
David Majda 10 years ago
parent 811a5c0f01
commit 4d456402be

@ -11,8 +11,8 @@ $("#run").click(function() {
} }
function appendResult(klass, title, url, inputSize, parseTime) { function appendResult(klass, title, url, inputSize, parseTime) {
var KB = 1024; var KB = 1024,
var MS_IN_S = 1000; MS_IN_S = 1000;
resultsTable.append( resultsTable.append(
"<tr class='" + klass + "'>" "<tr class='" + klass + "'>"
@ -56,17 +56,17 @@ $("#run").click(function() {
* 2. To minimize random errors. * 2. To minimize random errors.
*/ */
var runCount = parseInt($("#run-count").val(), 10); var runCount = parseInt($("#run-count").val(), 10),
options = {
cache: $("#cache").is(":checked"),
optimize: $("#optimize").val()
};
if (isNaN(runCount) || runCount <= 0) { if (isNaN(runCount) || runCount <= 0) {
alert("Number of runs must be a positive integer."); alert("Number of runs must be a positive integer.");
return; return;
} }
var options = {
cache: $("#cache").is(":checked"),
optimize: $("#optimize").val()
};
Runner.run(benchmarks, runCount, options, { Runner.run(benchmarks, runCount, options, {
readFile: function(file) { readFile: function(file) {
return $.ajax({ return $.ajax({

Loading…
Cancel
Save