Skip to content

Commit

Permalink
🚧 progress(benchmark/table): Add filter option.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Oct 15, 2021
1 parent 7e1e952 commit e9a0276
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _benchmark/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import {dist} from './_fixtures.js';

const parser = new ArgumentParser();
parser.add_argument('M');
parser.add_argument('filter');
const args = parser.parse_args();

const filter = new RegExp(args.filter, 'i');
global.range = range;
global.n = args.M;
global.measure = COUNTER;
Expand Down Expand Up @@ -119,7 +121,8 @@ const fds_finger_tree = {
};

const add = async (module, api, method) => {
// If (!filter.test(module.name)) return;
if (!filter.test(module.name)) return;
if (!filter.test(method)) return;
const {title, methods} = await api.compile(module);

suite.addFunction(`${title} #${method}`, methods[method].run, {
Expand Down

0 comments on commit e9a0276

Please sign in to comment.