-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[FR] global setup and teardown #1873
Comments
you can override main and do the global setup teardown in there. |
There are lots of globals. I was referring to the setup and teardown for a specific benchmark. Right now the setup and teardown runs each time the benchmark is run even if it is a repetition or if it is during gathering timings for the "real" run. |
ah i see, i misunderstood "global". so it sounds like there are three possible places to put setup/teardown:
and you're looking for #2. i'm not sure implementing #2 would be generally a good idea, only because it would potentially cause users to make mistakes where they think what they're doing in #2 is actually #3 and they introduce cross-run dependencies. |
What about a final teardown then? I could make my startup check if the files already exist and create them if they don't. But then not delete them until a final teardown. |
Is your feature request related to a problem? Please describe.
I have benchmarks that need to create files. The benchmark is run multiple times to establish timing. But it's expensive and pointless to create and delete the files for each repetition.
Describe the solution you'd like
I expected setup to run once at the beginning and teardown to run once at the end. If that's not feasible then it would be good to have a real "global" setup/teardown that doesn't get run for each repetition.
The text was updated successfully, but these errors were encountered: