bench-show icon indicating copy to clipboard operation
bench-show copied to clipboard

Enhance CLI options to filter and sort benchmarks

Open harendra-kumar opened this issue 6 years ago • 1 comments

The library supports filtering and sorting of benchmarks. However, this is not yet supported by the CLI. It could be very useful to tune presentation especially when there are many benchmarks in the csv file. We could possibly have two CLI options to enable something like this:

--filter-by "column-name:regex"
--sort-by "column-name:ascending|descending|enumeration"

We can use a grep like regex for filtering. Enumeration can be a comma separated list of values to specify a custom presentation order. This can only be useful to order the benchmark column. Note that filtering and sorting can also be done by an external awk script but that won't be convenient.

Also note that multiple of these options can be given on the command line and they can be combined to provide multiple level filtering/sorting.

In addition to the above, it is nice to have options to represent grouping, sorting and filtering of groups. However this is not required as often as the options above:

--group-by "group-name:regex"
--filter-groups-by "regex"
--sort-groups-by "ascending|descending|enumeration"

The regex determines the benchmarks that will be placed in the given group name.

cc: @SanchayanMaity

harendra-kumar avatar Feb 10 '19 14:02 harendra-kumar

@harendra-kumar I will take a look. Thank you.

SanchayanMaity avatar Feb 10 '19 16:02 SanchayanMaity