'Benchmark one specific `Test.Tasty.Bench` benchmark in a module using `cabal bench`

I have a bunch of benchmarks and I want to run a specific benchmark among them.

I had asked a previous similar question for tests. But the same technique does not work for benchmarks. Here are somethings I tried, where "benchmarkGroupName/benchmName" is the .

cabal test Module.Name.Here --benchmark-options="--match=\"<match-string>\""
cabal test Module.Name.Here --match=<match-string>
cabal test Module.Name.Here --benchmark-options="--pattern=\"<match-string>\""

It says something like

Invalid option `--match'

Usage: Module.Name.Here [-p|--pattern PATTERN] [-t|--timeout DURATION] 
                           [--stream-size ARG] [-l|--list-tests] 
                           [-j|--num-threads NUMBER] [-q|--quiet] 
                           [--hide-successes] [--color never|always|auto] 
                           [--ansi-tricks ARG] [--baseline ARG] [--csv ARG] 
                           [--svg ARG] [--stdev ARG] [--fail-if-slower ARG] 
                           [--fail-if-faster ARG]

Nothing works I've also looked at the documentation but it's not helpful.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source