Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我们有一些在冷启动时非常慢的大方法。我们可以做这样的基准测试并看到未预热的结果吗?
如前所述 - 这是可能的,官方文档中有一些信息。
[MinColumn, MaxColumn] [MemoryDiagnoser] [SimpleJob(RunStrategy.ColdStart, launchCount: 3, warmupCount: 0, targetCount: 6)] public class SomeBenchmark { [Benchmark] public string Benchmark() { } }