Skip to content

Commit 1072f02

Browse 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 8215f67 commit 1072f02

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/compare.js

+3-2
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)