Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbab7ec

Browse filesBrowse files
aduh95targos
authored andcommitted
benchmark: avoid using console.log()
PR-URL: #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>
1 parent 7d8cc2a commit cbab7ec
Copy full SHA for cbab7ec

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎benchmark/common.js‎

Copy file name to clipboardExpand all lines: benchmark/common.js
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.