Skip to content

benchmark: fix benchmark compare output

The patch https://github.com/nodejs/node/pull/43601 makes benchmark/compare.js not work as expected as it outputs malformed CSV data.

Expected outputs:

$ node benchmark/compare.js --new ./node --old ./node --filter ok assert
"binary","filename","configuration","rate","time"
"old","assert/ok.js","n=100000",38415366.14645858,0.002603125
"new","assert/ok.js","n=100000",36958903.17802217,0.002705708

Outputs with the main branch:

$ node benchmark/compare.js --new ./node --old ./node --filter ok assert
"binary","filename","configuration","rate","time"
assert/ok.js n=100000: 40,438,760.551989086
assert/ok.js n=100000: 40,999,014.79367451
assert/ok.js n=100000: 36,593,175.372792974
assert/ok.js n=100000: 37,697,312.44550382

This patch moves the forced exit introduced in https://github.com/nodejs/node/commit/684e1079653f670f1a6f611365203a32ba0b49d5 to Benchmark.report which is only used in benchmarking processes.

Merge request reports

Loading