diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-04-23 18:16:01 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-04-27 13:28:30 +0300 |
commit | 0c879cb7b8afc89b6350152fcf84fc4f73e4e46c (patch) | |
tree | 82bac08ede943ecd4aeec7e14d66641364e04775 /benchmark | |
parent | 47207e59f0f1aedbd5ee8ef674b26497f3251a84 (diff) |
benchmark: avoid using `console.log()`
PR-URL: https://github.com/nodejs/node/pull/38370
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/common.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/common.js b/benchmark/common.js index f48eda61157..3f7abf73632 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -283,7 +283,7 @@ function formatResult(data) { let rate = data.rate.toString().split('.'); rate[0] = rate[0].replace(/(\d)(?=(?:\d\d\d)+(?!\d))/g, '$1,'); rate = (rate[1] ? rate.join('.') : rate[0]); - return `${data.name}${conf}: ${rate}`; + return `${data.name}${conf}: ${rate}\n`; } function sendResult(data) { @@ -292,7 +292,7 @@ function sendResult(data) { process.send(data); } else { // Otherwise report by stdout - console.log(formatResult(data)); + process.stdout.write(formatResult(data)); } } |