Reputation: 151
Assume we have some big method which is very slow on a cold start. Can we do such benchmarks and see not warmed up results?
Upvotes: 1
Views: 1663
Reputation: 151
As was noted - it is possible and there is some info in official docs.
[MinColumn, MaxColumn]
[MemoryDiagnoser]
[SimpleJob(RunStrategy.ColdStart, launchCount: 3,
warmupCount: 0, targetCount: 6)]
public class SomeBenchmark
{
[Benchmark]
public string Benchmark()
{
}
}
Upvotes: 4