Ssss
Ssss

Reputation: 151

BenchmarkDotNet. Is it possible to include not warmed up results?

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

Answers (1)

Ssss
Ssss

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

Related Questions