Skip to content

Commit c976446

Browse files
committed
fix error where benchmarking type does not match in CI
modify config property because boolean cannot be used
1 parent 1ff400e commit c976446

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

benchmark/fs/bench-glob.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ const configs = {
1111
n: [1e3],
1212
dir: ['lib', 'test/parallel', 'benchmark'],
1313
pattern: ['**/*', '*.js', '**/**.js'],
14-
useAsync: [true, false],
15-
recursive: [true, false],
14+
mode: ['async', 'sync'],
15+
recursive: ['true', 'false'],
1616
};
1717

1818
const bench = common.createBenchmark(main, configs);
1919

2020
async function main(config) {
2121
const fullPath = path.resolve(benchmarkDirectory, config.dir);
22-
const { pattern, recursive, useAsync } = config;
22+
const { pattern, recursive, mode } = config;
2323

2424
let noDead;
2525
bench.start();
2626

2727
for (let i = 0; i < config.n; i++) {
28-
if (useAsync) {
28+
if (mode === 'async') {
2929
noDead = await new Promise((resolve, reject) => {
3030
fs.glob(pattern, { cwd: fullPath, recursive }, (err, files) => {
3131
if (err) {

0 commit comments

Comments
 (0)