Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line option to skip benchmarks #2392

Closed
nandanvasudevan opened this issue Mar 16, 2022 · 0 comments
Closed

Command line option to skip benchmarks #2392

nandanvasudevan opened this issue Mar 16, 2022 · 0 comments

Comments

@nandanvasudevan
Copy link

Description
Enable or disable benchmarks with a command line option

Additional context
I don't always want to run benchmarks. In the current situation using any ifdefs or #defines, triggers a complete re-compilation which is really time-consuming and something I really want to avoid.
It would be really helpful if there was a command line option to disable benchmarks.

Possibilities with existing

Lets look at what the current options to achieve this are.

Using Tags

Right now, one plausible way is to keep benchmarks in a separate TEST_CASE with a tag that reads 'Benchmark' and then disallow running of that tag which is supported.
However, this will almost always lead to code duplication since the setup code will need to be repeated just for the benchmark.

Using Sections

By keeping a benchmark as a section in TEST_CASE and then running only these sections seems possible.
However, there is option to specify, run all except this section.
This wouldn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants