rebar3_bench icon indicating copy to clipboard operation
rebar3_bench copied to clipboard

Add more sophisticated benchmark filter/selector

Open seriyps opened this issue 6 years ago • 0 comments

Right now we use basic -m module -b bench options. Would be nice to have something more flexible.

My suggestion is to introduce -f / --filter <rules> key:

match := [0-9a-z_-*]+
rule := match : match
rules := rule
rules := rules ',' rule

so, some examples:

--filter 'bench_my_mod:bench_my_fun'
--filter 'bench_my_mod:bench_my_*'
--filter 'bench_my_mod:*'
--filter 'bench_my_*:*'
--filter '*:*'
--filter 'bench_my_mod:bench_my_fun, bench_my_mod:bench_other_fun'
--filter 'bench_my_mod:*, bench_other_mod:*'
  • Not sure if we want to support wildcard at any position. Maybe only in the end of the word?
  • Shuld we allow to skip bench_ in function and module names?

seriyps avatar Sep 15 '19 22:09 seriyps