Skip to content

Commit 0f88fac

Browse files
committed
Print helpful message if no benchmarks are found matching patterns
1 parent 7475566 commit 0f88fac

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

benches/scripts/bench.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ export const defaultBenchOptions = {
3232
export async function runBenches(bench1 = 'all', opts) {
3333
const globs = bench1 === 'all' ? allBenches : [bench1].concat(opts._);
3434
const benchesToRun = await globSrc(globs);
35-
console.log('Running benchmarks:', benchesToRun.join(', '));
36-
console.log();
35+
36+
if (benchesToRun.length == 0) {
37+
console.log('No benchmarks found matching patterns:', globs);
38+
} else {
39+
console.log('Running benchmarks:', benchesToRun.join(', '));
40+
console.log();
41+
}
3742

3843
const configFileTasks = benchesToRun.map(async (benchPath, i) => {
3944
return generateConfig(benchesRoot('src', benchPath), {

0 commit comments

Comments
 (0)