Back to Benchmarkdotnet

Setup And Cleanup

docs/articles/features/setup-and-cleanup.md

0.15.8772 B
Original Source

Setup And Cleanup

Sometimes we want to write some logic which should be executed before or after a benchmark, but we don't want to measure it. For this purpose, BenchmarkDotNet provides a set of attributes: [GlobalSetup], [GlobalCleanup], [IterationSetup], [IterationCleanup].


[!includeIntroSetupCleanupGlobal]

[!includeIntroSetupCleanupIteration]

[!includeIntroSetupCleanupTarget]