Skip to content

Commit a2ee7ff

Browse files
🚧 progress(benchmark/table): Add filter option.
1 parent 7fc67b2 commit a2ee7ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

_benchmark/table.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ import {dist} from './_fixtures.js';
1515

1616
const parser = new ArgumentParser();
1717
parser.add_argument('M');
18+
parser.add_argument('filter');
1819
const args = parser.parse_args();
1920

21+
const filter = new RegExp(args.filter, 'i');
2022
global.range = range;
2123
global.n = args.M;
2224
global.measure = COUNTER;
@@ -119,7 +121,8 @@ const fds_finger_tree = {
119121
};
120122

121123
const add = async (module, api, method) => {
122-
// If (!filter.test(module.name)) return;
124+
if (!filter.test(module.name)) return;
125+
if (!filter.test(method)) return;
123126
const {title, methods} = await api.compile(module);
124127

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

0 commit comments

Comments
 (0)