Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions benchmark/_http-benchmarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ exports.run = function(options, callback) {
return;
}

const benchmarker_start = process.hrtime();
const benchmarker_start = process.hrtime.bigint();

const child = benchmarker.create(options);

Expand All @@ -233,7 +233,7 @@ exports.run = function(options, callback) {
child.stdout.on('data', (chunk) => stdout += chunk);

child.once('close', (code) => {
const elapsed = process.hrtime(benchmarker_start);
const benchmark_end = process.hrtime.bigint();
if (code) {
let error_message = `${options.benchmarker} failed with ${code}.`;
if (stdout !== '') {
Expand All @@ -250,6 +250,7 @@ exports.run = function(options, callback) {
return;
}

const elapsed = benchmark_end - benchmarker_start;
callback(null, code, options.benchmarker, result, elapsed);
});

Expand Down