Skip to content

Commit cbab7ec

Browse files
aduh95targos
authored andcommitted
benchmark: avoid using console.log()
PR-URL: #38370 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 7d8cc2a commit cbab7ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/common.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function formatResult(data) {
283283
let rate = data.rate.toString().split('.');
284284
rate[0] = rate[0].replace(/(\d)(?=(?:\d\d\d)+(?!\d))/g, '$1,');
285285
rate = (rate[1] ? rate.join('.') : rate[0]);
286-
return `${data.name}${conf}: ${rate}`;
286+
return `${data.name}${conf}: ${rate}\n`;
287287
}
288288

289289
function sendResult(data) {
@@ -292,7 +292,7 @@ function sendResult(data) {
292292
process.send(data);
293293
} else {
294294
// Otherwise report by stdout
295-
console.log(formatResult(data));
295+
process.stdout.write(formatResult(data));
296296
}
297297
}
298298

0 commit comments

Comments
 (0)