From a0f3d20763daf77a1a1275eca673a0120a7a7fd9 Mon Sep 17 00:00:00 2001 From: Peter <34331512+pmaytak@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:35:44 -0700 Subject: [PATCH 1/2] Set custom BDN config as default. --- benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs b/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs index 628d6c1225..0557db6fa5 100644 --- a/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs +++ b/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs @@ -16,7 +16,7 @@ public BenchmarkConfig() { AddJob(Job.MediumRun .WithLaunchCount(4) - .WithMaxAbsoluteError(TimeInterval.FromMilliseconds(10))) + .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) From f4da752bce5b6a8c6ee6cc0c46d4956dfeded5d9 Mon Sep 17 00:00:00 2001 From: Peter <34331512+pmaytak@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:17:28 -0700 Subject: [PATCH 2/2] Fix formatting. --- .../BenchmarkConfig.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs b/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs index 0557db6fa5..d66c8638c4 100644 --- a/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs +++ b/benchmark/Microsoft.IdentityModel.Benchmarks/BenchmarkConfig.cs @@ -16,14 +16,15 @@ public BenchmarkConfig() { AddJob(Job.MediumRun .WithLaunchCount(4) - .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/ + .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/ } } }