uid |
---|
BenchmarkDotNet.Samples.IntroSetupCleanupTarget |
Sometimes it's useful to run setup or cleanups for specific benchmarks. All four setup and cleanup attributes have a Target property that allow the setup/cleanup method to be run for one or more specific benchmark methods.
[!code-csharpIntroSetupCleanupTarget.cs]
// GlobalSetup A
// Benchmark A
// GlobalSetup B
// Benchmark B
// GlobalSetup B
// Benchmark C
// Benchmark D
- @docs.setup-and-cleanup