Skip to content

Commit

Permalink
Set custom BenchmarkDotNetconfig as default (#2852)
Browse files Browse the repository at this point in the history
* Set custom BDN config as default.

* Fix formatting.
  • Loading branch information
pmaytak authored Sep 30, 2024
1 parent 9a0376d commit f6c8f02
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ public BenchmarkConfig()
{
AddJob(Job.MediumRun
.WithLaunchCount(4)
.WithMaxAbsoluteError(TimeInterval.FromMilliseconds(10)))
// uncomment to disable validation to enable debugging through benchmarks
//.WithOption(ConfigOptions.DisableOptimizationsValidator, true)
.AddColumn(StatisticColumn.P90, StatisticColumn.P95, StatisticColumn.P100)
.WithOrderer(new DefaultOrderer(SummaryOrderPolicy.Method))
.HideColumns(Column.WarmupCount, Column.Type, Column.Job)
.AddDiagnoser(MemoryDiagnoser.Default); // https://benchmarkdotnet.org/articles/configs/diagnosers.html
//.AddDiagnoser(new EtwProfiler()) // Uncomment to generate traces / flame graphs. Doc: https://adamsitnik.com/ETW-Profiler/
.WithMaxAbsoluteError(TimeInterval.FromMilliseconds(10))
.AsDefault())
// uncomment to disable validation to enable debugging through benchmarks
//.WithOption(ConfigOptions.DisableOptimizationsValidator, true)
.AddColumn(StatisticColumn.P90, StatisticColumn.P95, StatisticColumn.P100)
.WithOrderer(new DefaultOrderer(SummaryOrderPolicy.Method))
.HideColumns(Column.WarmupCount, Column.Type, Column.Job)
.AddDiagnoser(MemoryDiagnoser.Default); // https://benchmarkdotnet.org/articles/configs/diagnosers.html
//.AddDiagnoser(new EtwProfiler()) // Uncomment to generate traces / flame graphs. Doc: https://adamsitnik.com/ETW-Profiler/
}
}
}

0 comments on commit f6c8f02

Please sign in to comment.