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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
86c659ba61
commit
809af1fe8a
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const fork = require('child_process').fork;
|
||||
const { fork } = require('child_process');
|
||||
const { inspect } = require('util');
|
||||
const path = require('path');
|
||||
const CLI = require('./_cli.js');
|
||||
const BenchmarkProgress = require('./_benchmark_progress.js');
|
||||
@ -76,7 +77,7 @@ if (showProgress) {
|
||||
// Construct configuration string, " A=a, B=b, ..."
|
||||
let conf = '';
|
||||
for (const key of Object.keys(data.conf)) {
|
||||
conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
|
||||
conf += ` ${key}=${inspect(data.conf[key])}`;
|
||||
}
|
||||
conf = conf.slice(1);
|
||||
// Escape quotes (") for correct csv formatting
|
||||
|
Loading…
x
Reference in New Issue
Block a user