-
-
Notifications
You must be signed in to change notification settings - Fork 443
Allow easy call single benchmark #7145
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7145 +/- ##
==========================================
- Coverage 92.98% 92.88% -0.11%
==========================================
Files 619 619
Lines 56653 56653
==========================================
- Hits 52677 52620 -57
- Misses 3976 4033 +57 ☔ View full report in Codecov by Sentry. |
would be nicer if we didn't neeed to change all the benchmark files. Maybe just have a cli in python -m napari.benchmarks Shapes3DSuite.time_get_value |
But what to do with name collisions? File name is part of test identifier. |
But feel free to ignore, not a big deal :) |
@brisvag done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and clean :)
# References and relevant issues depends on napari/napari#7145 # Description Add documentation on how easy run benchmarks under debugger to easier understand why benchmarks fail. --------- Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
In napari#7145 I have implemented option to call benchmarks without using asv (for debug purpose. Hovewer I forgoten about case of benchmarks without any parameters. I also forgot about call of teardown method. This PR is fixing this.
# Description In #7145 I have implemented option to call benchmarks without using asv (for debug purpose). However, I have forgotten about the case of benchmarks without any parameters. I also forgot about the call of teardown method. This PR is fixing this.
References and relevant issues
extracted from #7144
Description
This PR allows calling a single benchmark method without whole setup asv. It simplifies debugging.
It is a simple change and may not support all asv options (for example, it does not allow running functional benchmark)
Example call
python napari/benchmarks/benchmark_shapes_layer.py Shapes3DSuite.time_get_value