Skip to content

Commit b0ccba4

Browse files
Update benchmark
1 parent 318686d commit b0ccba4

6 files changed

Lines changed: 18 additions & 10 deletions

File tree

EFCore.Benchmarks/EFCore.Benchmarks.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.3" />
2121
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.3" />
2222
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.3" />
23+
<PackageReference Include="Microting.EntityFrameworkCore.MySql" Version="10.0.7" />
2324
<PackageReference Include="MySql.EntityFrameworkCore" Version="10.0.1" />
2425
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
2526
<PackageReference Include="Oracle.EntityFrameworkCore" Version="10.23.26100" />
26-
<PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="10.105.2.2" />
27+
<PackageReference Include="Z.EntityFramework.Extensions.EFCore" Version="10.105.5" />
2728
</ItemGroup>
2829

2930
<ItemGroup>

EFCore.Benchmarks/Model/TestProviderKind.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public enum TestProviderKind
55
SqlServer,
66
MariaDB,
77
MySQL,
8+
MicrotingMySQL,
89
PostgreSQL,
910
SQLite,
1011
Oracle,

EFCore.Benchmarks/Model/_TestDbContext.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public void EnsureSetup()
1818
case TestProviderKind.SQLite:
1919
case TestProviderKind.MySQL:
2020
case TestProviderKind.MariaDB:
21-
this.Database.EnsureCreated();
21+
case TestProviderKind.MicrotingMySQL:
22+
this.Database.EnsureCreated();
2223
break;
2324
case TestProviderKind.Oracle:
2425
try
@@ -58,11 +59,12 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
5859
case TestProviderKind.MariaDB:
5960
optionsBuilder.UseMySQL(My.MariaDB);
6061
break;
61-
6262
case TestProviderKind.MySQL:
6363
optionsBuilder.UseMySQL(My.MySQL);
6464
break;
65-
65+
case TestProviderKind.MicrotingMySQL:
66+
optionsBuilder.UseMySql(My.Microting, new MySqlServerVersion(new Version(8, 3, 0)));
67+
break;
6668
case TestProviderKind.PostgreSQL:
6769
optionsBuilder.UseNpgsql(My.PostgreSQL);
6870
break;

EFCore.Benchmarks/My.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ static My()
1818
public static string SQLite => _configuration.GetConnectionString("SQLite")!;
1919
public static string MariaDB => _configuration.GetConnectionString("MariaDB")!;
2020
public static string MySQL => _configuration.GetConnectionString("MySQL")!;
21+
public static string Microting => _configuration.GetConnectionString("Microting")!;
2122
public static string PostgreSQL => _configuration.GetConnectionString("PostgreSQL")!;
2223
public static string Oracle => _configuration.GetConnectionString("Oracle")!;
2324
}

EFCore.Benchmarks/Program.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using BenchmarkDotNet.Running;
99
using Perfolizer.Horology;
1010
using Perfolizer.Metrology;
11+
using Z.BulkOperations;
1112

1213
namespace EFCore.Benchmarks
1314
{
@@ -38,12 +39,13 @@ public class ProgramBenchmarks
3839
// - Multiple providers: put them in the SAME [Params(...)] line.
3940
// ─────────────────────────────────────────────────────────────────────────
4041
[Params(
41-
TestProviderKind.SqlServer
42+
TestProviderKind.SqlServer
4243
//, TestProviderKind.PostgreSQL
4344
//, TestProviderKind.Oracle
4445
//, TestProviderKind.SQLite
4546
//, TestProviderKind.MySQL
4647
//, TestProviderKind.MariaDB
48+
// TestProviderKind.MicrotingMySQL
4749
)]
4850
public TestProviderKind ProviderKind;
4951

@@ -56,9 +58,9 @@ public class ProgramBenchmarks
5658
[Params(
5759
//, 10
5860
//, 100
59-
//, 1_000
60-
10_000
61-
//, 100_000
61+
1_000
62+
, 10_000
63+
, 100_000
6264
//, 1_000_000
6365
)]
6466
public int EntityCount;
@@ -86,7 +88,7 @@ static void Main(string[] args)
8688
// ==== Bulk Insert ====
8789
typeof(BulkInsertBenchmark),
8890
typeof(BulkInsertWithGraphBenchmark),
89-
typeof(BulkInsertWithKeepIdentityBenchmark),
91+
//typeof(BulkInsertWithKeepIdentityBenchmark),
9092

9193
// ==== Bulk Merge ====
9294
//typeof(BulkMergeBenchmark),

EFCore.Benchmarks/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"SQLite": "Data Source=EFCore_BulkBenchmark.db",
55
"MariaDB": "Server=localhost;Database=EFCore_BulkBenchmark;Uid=root;Pwd=;Charset=utf8;Port=3307;SslMode=none",
66
"MySQL": "Server=localhost;Database=EFCore_BulkBenchmark;Uid=root;Pwd=;Charset=utf8;Port=3306;SslMode=none",
7+
"Microting": "Server=localhost;Database=EFCore_BulkBenchmark;Uid=root;Pwd=;Charset=utf8;Port=3306;SslMode=none;AllowLoadLocalInfile=true",
78
"PostgreSQL": "Server=127.0.0.1;Port=5433;Database=EFCore_BulkBenchmark;User Id=postgres;Password=z;",
89
"Oracle": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl21c))); User Id=System; Password=z;"
910
}
10-
}
11+
}

0 commit comments

Comments
 (0)