question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allowing --benchmark-skip and --benchmark-only

See original GitHub issue

What do you think about allowing both --benchmark-skip and --benchmark-only and giving the latter precedence? That’d mean one could have --benchmark-skip in pytest.ini in order to never run benchmarks on normal testruns, and add --benchmark-only on the commandline for benchmark runs.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Suorcommented, May 21, 2017

I think tests and benchmarks should be separated. Can’t think of a situation when I want to run both tests and benchmarks in a single call. This is being the default behavior puzzles me.

0reactions
ionelmccommented, Jan 6, 2019

Uh … so I’ve checked the code, --benchmark-enable overrides --benchmark-disable since b181664c407b4c30354baaa89fde76057bdb71d1.

Can we just close this and leave it at that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Usage — pytest-benchmark 4.0.0 documentation
A better way is to just benchmark the final function: ... Skip running any tests that contain benchmarks. ... --benchmark-enable.
Read more >
pytest-benchmark - Read the Docs
--benchmark-disable Disable benchmarks. Benchmarked functions are only ran once and no stats are reported.
Read more >
Enabling or disabling the Benchmark Test and Reading Level ...
Changing test enablement settings means that you can enable or disable the Benchmark Test or Reading Level Assessment for all test...
Read more >
Benchmarks - Practical Go Lessons
The benchmark will not just run the function one time but several time to gather ... This flag allows you to control your...
Read more >
Frequently Asked Questions - Criterion.rs Documentation
The other option is to move those non-benchmark files to a subdirectory (eg. benches/benchmark_code ) where they will no longer be detected as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found