Skip to content

Commit a0f33c9

Browse files
committed
Fixed benchmarks from update
1 parent 0140010 commit a0f33c9

3 files changed

Lines changed: 13 additions & 15 deletions

File tree

tests/CacheTower.Benchmarks/CacheStackBenchmark.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
using BenchmarkDotNet.Configs;
88
using BenchmarkDotNet.Diagnosers;
99
using BenchmarkDotNet.Environments;
10-
using BenchmarkDotNet.Horology;
1110
using BenchmarkDotNet.Jobs;
1211
using CacheTower.Providers.Memory;
12+
using Perfolizer.Horology;
1313

1414
namespace CacheTower.Benchmarks
1515
{
@@ -23,10 +23,10 @@ public class ConfigSettings : ManualConfig
2323
{
2424
public ConfigSettings()
2525
{
26-
Add(Job.Default.With(CoreRuntime.Core30).WithMaxIterationCount(50));
27-
Add(MemoryDiagnoser.Default);
26+
AddJob(Job.Default.WithRuntime(CoreRuntime.Core30).WithMaxIterationCount(50));
27+
AddDiagnoser(MemoryDiagnoser.Default);
2828

29-
SummaryStyle = new BenchmarkDotNet.Reports.SummaryStyle(true, SizeUnit.B, TimeUnit.Nanosecond);
29+
SummaryStyle = new BenchmarkDotNet.Reports.SummaryStyle(CultureInfo, true, SizeUnit.B, TimeUnit.Nanosecond);
3030
}
3131
}
3232

tests/CacheTower.Benchmarks/Extensions/BaseExtensionsBenchmark.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
using BenchmarkDotNet.Configs;
88
using BenchmarkDotNet.Diagnosers;
99
using BenchmarkDotNet.Environments;
10-
using BenchmarkDotNet.Horology;
1110
using BenchmarkDotNet.Jobs;
1211
using CacheTower.Providers.Memory;
12+
using Perfolizer.Horology;
1313

1414
namespace CacheTower.Benchmarks.Extensions
1515
{
@@ -20,12 +20,11 @@ public class ConfigSettings : ManualConfig
2020
{
2121
public ConfigSettings()
2222
{
23-
Add(Job.Default.With(CoreRuntime.Core30).WithMaxIterationCount(200));
24-
Add(MemoryDiagnoser.Default);
23+
AddJob(Job.Default.WithRuntime(CoreRuntime.Core30).WithMaxIterationCount(200));
24+
AddDiagnoser(MemoryDiagnoser.Default);
2525

26-
SummaryStyle = new BenchmarkDotNet.Reports.SummaryStyle(true, SizeUnit.B, TimeUnit.Nanosecond);
26+
SummaryStyle = new BenchmarkDotNet.Reports.SummaryStyle(CultureInfo, true, SizeUnit.B, TimeUnit.Nanosecond);
2727
}
28-
2928
}
3029
protected Func<ICacheExtension> CacheExtensionProvider { get; set; }
3130

tests/CacheTower.Benchmarks/Providers/BaseCacheLayerBenchmark.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
using BenchmarkDotNet.Configs;
88
using BenchmarkDotNet.Diagnosers;
99
using BenchmarkDotNet.Environments;
10-
using BenchmarkDotNet.Horology;
1110
using BenchmarkDotNet.Jobs;
11+
using Perfolizer.Horology;
1212

1313
namespace CacheTower.Benchmarks.Providers
1414
{
@@ -19,12 +19,11 @@ public class ConfigSettings : ManualConfig
1919
{
2020
public ConfigSettings()
2121
{
22-
Add(Job.Default.With(CoreRuntime.Core30).WithMaxIterationCount(200));
23-
Add(MemoryDiagnoser.Default);
24-
25-
SummaryStyle = new BenchmarkDotNet.Reports.SummaryStyle(true, SizeUnit.B, TimeUnit.Nanosecond);
26-
}
22+
AddJob(Job.Default.WithRuntime(CoreRuntime.Core30).WithMaxIterationCount(200));
23+
AddDiagnoser(MemoryDiagnoser.Default);
2724

25+
SummaryStyle = new BenchmarkDotNet.Reports.SummaryStyle(CultureInfo, true, SizeUnit.B, TimeUnit.Nanosecond);
26+
}
2827
}
2928

3029
[Params(1, 100)]

0 commit comments

Comments
 (0)