Skip to content

Commit 7a9d0fd

Browse files
aduh95danielleadams
authored andcommitted
benchmark: fix http elapsed time
Since commit 4e9ad20, elapsed time is expected to be a BigInt instead of an array. Refs: #38369 PR-URL: #38743 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
1 parent 7773d58 commit 7a9d0fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/_http-benchmarkers.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ exports.run = function(options, callback) {
222222
return;
223223
}
224224

225-
const benchmarker_start = process.hrtime();
225+
const benchmarker_start = process.hrtime.bigint();
226226

227227
const child = benchmarker.create(options);
228228

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

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

253+
const elapsed = benchmark_end - benchmarker_start;
253254
callback(null, code, options.benchmarker, result, elapsed);
254255
});
255256

0 commit comments

Comments
 (0)