Browse Source

Small cleanup of benchmark/index.js

Update coding style to match the rest of PEG.js.
redux
David Majda 8 years ago
parent
commit
4d456402be
  1. 16
      benchmark/index.js

16
benchmark/index.js

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

Loading…
Cancel
Save