diff --git a/benchmark/_cli.js b/benchmark/_cli.js index 17718c4c4d757a..4d92b05b1b82b4 100644 --- a/benchmark/_cli.js +++ b/benchmark/_cli.js @@ -88,6 +88,8 @@ CLI.prototype.benchmarks = function() { const filter = this.optional.filter || false; for (const category of this.items) { + if (benchmarks[category] === undefined) + continue; for (const scripts of benchmarks[category]) { if (filter && scripts.lastIndexOf(filter) === -1) continue; diff --git a/benchmark/compare.js b/benchmark/compare.js index a671bc9f3d7be6..4d183a10e2b97d 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -35,7 +35,7 @@ const runs = cli.optional.runs ? parseInt(cli.optional.runs, 10) : 30; const benchmarks = cli.benchmarks(); if (benchmarks.length === 0) { - console.error('no benchmarks found'); + console.error('No benchmarks found'); process.exitCode = 1; return; }