From 7d7ff6024a5b5b6aa47bd739ffef4ae1eec7ae89 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Sun, 27 Aug 2017 18:17:51 +0200 Subject: [PATCH] tweaking the benchmark grammar file to produce less cluttered benchmark output. --- examples/benchmark.js | 9 ++------- examples/parser-to-lexer-communication-test.jison | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/benchmark.js b/examples/benchmark.js index fe0646f8c..ce5260eff 100644 --- a/examples/benchmark.js +++ b/examples/benchmark.js @@ -245,12 +245,7 @@ function bench(f, n, minimum_run_time, setup_f, destroy_f) { var fmultiplier = 250 / sample1; var multiplier = Math.max(1, (fmultiplier + 0.5) | 0); run = Math.max(run, multiplier); - console.log({ - fmultiplier, - multiplier, - sample1, - run - }); + console.log("run multiplier: ", run); // get the number of tests internal to the test function: 1 or more var internal_cnt = f(); @@ -324,7 +319,7 @@ function bench(f, n, minimum_run_time, setup_f, destroy_f) { //console.log('consumed', consumed, ts[ts.length - 1], i); if (last_report <= consumed) { console.log('#' + (ts.length * factor)); - last_report = consumed + 500; + last_report = consumed + 1000; } if (consumed < minimum_run_time || ts.length < 10) { // stay in the loop until 5 seconds have expired or at least 10 rounds have been executed! diff --git a/examples/parser-to-lexer-communication-test.jison b/examples/parser-to-lexer-communication-test.jison index 8c983d0ee..dd39a9332 100644 --- a/examples/parser-to-lexer-communication-test.jison +++ b/examples/parser-to-lexer-communication-test.jison @@ -173,9 +173,6 @@ parser.main = function compiledRunner(args) { var logcount = 0; parser.post_parse = function (tok) { logcount++; - if (logcount % 65000 === 0) { - console.log('run #', logcount); - } }; bench(execute, 0, 10e3, null, function () {