Skip to content

Commit

Permalink
Clarify effects of IterationSetup on UnrollFactor and InvocationCount
Browse files Browse the repository at this point in the history
As mentioned in dotnet#730 (comment)
  • Loading branch information
SnakyBeaky authored Aug 16, 2021
1 parent 1a8296f commit 3782896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/articles/samples/IntroSetupCleanupIteration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ uid: BenchmarkDotNet.Samples.IntroSetupCleanupIteration
## Sample: IntroSetupCleanupIteration

A method which is marked by the [`[IterationSetup]`](xref:BenchmarkDotNet.Attributes.IterationSetupAttribute)
attribute will be executed exactly once *before each benchmark invocation* (we have changed that in 0.11.0).
attribute will be executed exactly once *before each benchmark invocation*, forcing `UnrollFactor=1` and `InvocationCount=1` (we have changed that in 0.11.0).
It's not recommended to use this attribute in microbenchmarks because it can spoil the results.
However, if you are writing a macrobenchmark (e.g. a benchmark which takes at least 100ms) and
you want to prepare some data before each invocation,
Expand Down

0 comments on commit 3782896

Please sign in to comment.