Skip to content

Commit

Permalink
tweaking the benchmark grammar file to produce less cluttered benchma…
Browse files Browse the repository at this point in the history
…rk output.
  • Loading branch information
GerHobbelt committed Aug 27, 2017
1 parent d614873 commit 7d7ff60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 2 additions & 7 deletions examples/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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!
Expand Down
3 changes: 0 additions & 3 deletions examples/parser-to-lexer-communication-test.jison
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 7d7ff60

Please sign in to comment.