-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Implement benchmarking support #852
Comments
I will note that there is |
I mean you're either not gonna do benchmarks (which is okay, this is a test framework), do them badly (even worse than not doing them) or do them right (in which case you could just use nonius instead). IMO this is a classic Separation Of Concerns problem, and implementing benchmarks in a testing framework (possibly badly, since it's an extremely hard thing to get right) is a worse decision in every way than using nonius, which does them 100% right, is more fully-featured and is built around&for doing benchmarks. |
I have no problem using a separate tool for bench marking. I have started using nonius because it supports a similar workflow to Catch, a header only library that I can include directly in my testing directory. I also like Celero because it allows you to setup a baseline to compare other benchmarks against, but it has to be compiled so there is some extra build configuration that has to happen. But, what I really like about Catch is the SECTION feature. Not having to write a fixture class to do setup and teardown is great. I would really like a benchmark tool that supported sections. So, should we ask the nonius maintainer to add support for Catch-style fixtures? |
I've since used nonius, too (thanks for the recommendation, @nabijaczleweli). |
Well, I've been using nonius for a bit now, and I think this would be a nice feature to add to Catch. Specifically, I find myself wanting to add I really like nonius's approach to timing. It automatically determines how many times to run the test to get a "good" measurment, and performs a statistical analysis on the timing measurments. I think I heard @philsquared say that he did something similar on a different project. So, my idea is to add a MEASURE macro that acts like a SECTION but wraps its body in something like nonius's |
Just came across this |
The just released version in fact contains slightly adapted Nonius code. |
There were several requests for benchmarking support in Catch. This is not something that will be added to Catch Classic, but it might be added to Catch 2 at some point (probably not to the first release though).
The text was updated successfully, but these errors were encountered: