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 4d78eb8

Browse filesBrowse files
BridgeARMylesBorins
authored andcommitted
benchmark: improve compare output
The current output uses JSON.stringify to escape the config values. This switches to util.inspect to have a better readable output. PR-URL: #18597 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent ba46103 commit 4d78eb8
Copy full SHA for 4d78eb8

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎benchmark/compare.js‎

Copy file name to clipboardExpand all lines: benchmark/compare.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
const fork = require('child_process').fork;
3+
const { fork } = require('child_process');
4+
const { inspect } = require('util');
45
const path = require('path');
56
const CLI = require('./_cli.js');
67
const BenchmarkProgress = require('./_benchmark_progress.js');
@@ -76,7 +77,7 @@ if (showProgress) {
7677
// Construct configuration string, " A=a, B=b, ..."
7778
let conf = '';
7879
for (const key of Object.keys(data.conf)) {
79-
conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
80+
conf += ` ${key}=${inspect(data.conf[key])}`;
8081
}
8182
conf = conf.slice(1);
8283
// Escape quotes (") for correct csv formatting

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.