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
Support --max-runs <n>
and --runs <n>
#77
Comments
Thank you for the feedback! This sounds reasonable, but I would like to know what the use-cases for these options are. |
I think it is a fundamental option to be able to say "run this benchmark exactly n times". To give a concrete example: this is useful if you want to run benchmark that take a long time. For instance, recently I was benchmarking rustc by compiling itself. Each run would take ~50 minutes. I want to be able to say "run exactly 5 times" (or maybe "run at most 5 times"). |
So the way this currently works is the following:
My initial idea to implement it in this way was the following: Any number of runs below Consequently, if you have a "long-running" process (where long-running means I realize now that this should have been documented somewhere, but given these constraints, I don't quite see the need for a I'm open for new ideas about the general way we handle (the computation of) the number of runs, but I'm not convinced that |
That is true, but just because there is a way to do it, doesn't mean there shouldn't be a better/easier way. Doing it like this means that for someone to be able to run a benchmark exactly n time - which I would say is a very common scenario - they will have to learn a few things, and even if those things are documented, they will have to: 1. looks up documentation to learn that the default number of iterations is This may be all simple logical steps to take, but it still makes it unreasonably harder than it need to be to achieve this simple, common, task. There is also another argument: currently the default number of iterations is always |
Thank you for the feedback, you have some good points! I'll look into your PR soon. |
Released in v1.3.0. |
The user should be able to specify the maximum number of runs or the exact number of runs.
The text was updated successfully, but these errors were encountered: