Skip to content

Commit e8bf05f

Browse files
committed
benchmark: calibrate util.parse-env
According to nodejs/performance#186 this benchmark takes 0.34 minute to run a single run. So using calibrate-n script it suggests reduce it from 3e4 to 10
1 parent cbbcd31 commit e8bf05f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

benchmark/util/parse-env.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ const util = require('node:util');
77
const assert = require('node:assert');
88

99
const bench = createBenchmark(main, {
10-
n: 3e4,
10+
n: 10,
1111
});
1212

13-
const env = fs.readFileSync(path.resolve(__dirname, '../fixtures/valid.env'), 'utf-8');
13+
const env = fs.readFileSync(
14+
path.resolve(__dirname, '../fixtures/valid.env'),
15+
'utf-8',
16+
);
1417

1518
function main({ n }) {
1619
let noDead;

0 commit comments

Comments
 (0)