diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-04-23 18:16:01 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-04-29 14:45:38 +0300 |
commit | cbab7ec6e567f61c523430350c637646226e434b (patch) | |
tree | 201a5ab2a98f748144d79800310ca7e11ad78f25 /benchmark | |
parent | 7d8cc2abf1637544ae9c65a1270a09fafb9dc0d3 (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)); } } |