You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Setup and Teardown run for every repetition of the benchmark. As the runner gathers timings it keeps running setup and teardown unnecessarily.
Describe the solution you'd like
For a given benchmark with a specific set of parameters, there should be a way to specify a setup and teardown that runs exactly once.
e.g. RegisterBenchmark(name, func, params...)->SetupOnce(functor)->TeardownOnce(functor).
Describe alternatives you've considered
I haven't found an alternative other than allowing setup and teardown to run unnecessarily and consume resources.
Additional context
If I were trying to benchmark reading the same data from alternative file formats. I might make a general function that can be parameterized on the different formats. The setup would create the file, teardown would delete the file, and the benchmark would extract the data.
It's unnecessary for the setup and teardown to do that again and again for each repetition of the same benchmark with the same parameters. Especially if, say, you had to make the file very large to get accurate benchmark data.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Setup and Teardown run for every repetition of the benchmark. As the runner gathers timings it keeps running setup and teardown unnecessarily.
Describe the solution you'd like
For a given benchmark with a specific set of parameters, there should be a way to specify a setup and teardown that runs exactly once.
e.g. RegisterBenchmark(name, func, params...)->SetupOnce(functor)->TeardownOnce(functor).
Describe alternatives you've considered
I haven't found an alternative other than allowing setup and teardown to run unnecessarily and consume resources.
Additional context
If I were trying to benchmark reading the same data from alternative file formats. I might make a general function that can be parameterized on the different formats. The setup would create the file, teardown would delete the file, and the benchmark would extract the data.
It's unnecessary for the setup and teardown to do that again and again for each repetition of the same benchmark with the same parameters. Especially if, say, you had to make the file very large to get accurate benchmark data.
The text was updated successfully, but these errors were encountered: