File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,14 @@ uid: BenchmarkDotNet.Samples.IntroSetupCleanupIteration
55## Sample: IntroSetupCleanupIteration
66
77A method which is marked by the [ ` [IterationSetup] ` ] ( xref:BenchmarkDotNet.Attributes.IterationSetupAttribute )
8- attribute will be executed only once * before each an iteration * .
8+ attribute will be executed exactly once * before each benchmark invocation * (we have changed that in 0.11.0) .
99It's not recommended to use this attribute in microbenchmarks because it can spoil the results.
1010However, if you are writing a macrobenchmark (e.g. a benchmark which takes at least 100ms) and
11- you want to prepare some data before each iteration ,
11+ you want to prepare some data before each invocation ,
1212 [ ` [IterationSetup] ` ] ( xref:BenchmarkDotNet.Attributes.IterationSetupAttribute ) can be useful.
13- BenchmarkDotNet doesn't support setup/cleanup method for a single method invocation (* an operation* ),
14- but you can perform only one operation per iteration.
15- It's recommended to use ` RunStrategy.Monitoring ` for such cases.
1613
1714A method which is marked by the [ ` [IterationCleanup] ` ] ( xref:BenchmarkDotNet.Attributes.IterationCleanupAttribute )
18- attribute will be executed only once * after each an iteration * .
15+ attribute will be executed exactly once * after each invocation * .
1916This attribute has the same set of constraint with ` [IterationSetup] ` : it's not recommended to use
2017 [ ` [IterationCleanup] ` ] ( xref:BenchmarkDotNet.Attributes.IterationCleanupAttribute ) in microbenchmarks.
2118
You can’t perform that action at this time.
0 commit comments