Skip to content

Allow filter to filter by group name #53

@aslushnikov

Description

@aslushnikov

Hi @evanwashere !

Consider the following setup where a mitata.group is used to group together a bunch of parametrized benchmarks:

import * as mitata from 'mitata';

mitata.group(`some elaborate name for the list of benchmarks`, () => {
  mitata.bench(`x=$x`, function* (state: mitata.k_state) {
    const x = Query.parse(state.get('x'));
    yield () => {
      mitata.do_not_optimize(x * x);
    }
  }).args({
    'x': [1,2,4,5,6], 
  });
});

await mitata.run({
  filter: /elaborate/,
});

Ideally, I'd love to run the benches using the filter option in mitata.run that filters by the group name.
This doesn't work today; would you be open to this functionality?

P.S. thank you for the awesome project: mitata is a joy to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions