Skip to content

Commit ce3fbbc

Browse files
committed
Add benchmark configuration.
Nondeterministic DB connection introduces too much noise. There is no need to benchmark so extensively.
1 parent ceba517 commit ce3fbbc

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using BenchmarkDotNet.Attributes;
2+
using BenchmarkDotNet.Configs;
3+
using BenchmarkDotNet.Diagnosers;
4+
using BenchmarkDotNet.Environments;
5+
using BenchmarkDotNet.Jobs;
6+
7+
namespace EFCore.Cassandra.Benchmarks
8+
{
9+
[Config(typeof(CassandraBenchmarkConfig))]
10+
public class CassandraBenchmarkConfig : ManualConfig
11+
{
12+
public CassandraBenchmarkConfig()
13+
{
14+
AddJob(
15+
Job.Default
16+
.WithPlatform(Platform.X64)
17+
.WithJit(Jit.RyuJit)
18+
.WithRuntime(CoreRuntime.Core31)
19+
.WithWarmupCount(1)
20+
.WithIterationCount(3)
21+
.WithId("Cassandra benchmark config"));
22+
23+
AddDiagnoser(MemoryDiagnoser.Default);
24+
}
25+
}
26+
}

src/EFCore.Cassandra.Benchmarks/InsertData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace EFCore.Cassandra.Benchmarks
1111
{
12+
[Config(typeof(CassandraBenchmarkConfig))]
1213
public class InsertData : IDisposable
1314
{
1415
private readonly FakeDbContext _dbContext;

0 commit comments

Comments
 (0)