Skip to content

Commit

Permalink
benchmark: make v8-bench.js output consistent
Browse files Browse the repository at this point in the history
This changes the way v8-bench.js reports its performance to be consistent
with other benchmarks.

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
PR-URL: #8564
  • Loading branch information
bzoz committed Sep 26, 2016
1 parent 99a2dd0 commit 9e5a06e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions benchmark/misc/v8-bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ load('regexp.js');
load('splay.js');
load('navier-stokes.js');

const benchmark_name = path.join('misc', 'v8-bench.js');
const times = {};
global.BenchmarkSuite.RunSuites({
NotifyStart: function(name) {
Expand All @@ -31,8 +32,10 @@ global.BenchmarkSuite.RunSuites({
NotifyResult: function(name, result) {
const elapsed = process.hrtime(times[name]);
common.sendResult({
name: name,
conf: {},
name: benchmark_name,
conf: {
benchmark: name
},
rate: result,
time: elapsed[0] + elapsed[1] / 1e9
});
Expand All @@ -42,8 +45,10 @@ global.BenchmarkSuite.RunSuites({
},
NotifyScore: function(score) {
common.sendResult({
name: 'Score (version ' + global.BenchmarkSuite.version + ')',
conf: {},
name: benchmark_name,
conf: {
benchmark: 'Score (version ' + global.BenchmarkSuite.version + ')'
},
rate: score,
time: 0
});
Expand Down

0 comments on commit 9e5a06e

Please sign in to comment.