File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
3
<OutputType >Exe</OutputType >
4
- <TargetFrameworks >net48;netcoreapp3.1 </TargetFrameworks >
5
- <LangVersion >8 .0</LangVersion >
4
+ <TargetFrameworks >net48;net5.0 </TargetFrameworks >
5
+ <LangVersion >9 .0</LangVersion >
6
6
</PropertyGroup >
7
7
<ItemGroup >
8
8
<PackageReference Include =" BenchmarkDotNet" Version =" 0.12.1" />
9
- <PackageReference Include =" MySqlConnector" Version =" 1.0 .0-beta.5 " />
10
- <PackageReference Include =" MySql.Data" Version =" 8.0.20 " />
9
+ <PackageReference Include =" MySqlConnector" Version =" 1.3 .0-beta.4 " />
10
+ <PackageReference Include =" MySql.Data" Version =" 8.0.21 " />
11
11
</ItemGroup >
12
12
</Project >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ static void Main()
24
24
. AddDiagnoser ( MemoryDiagnoser . Default )
25
25
. AddColumn ( StatisticColumn . AllStatistics )
26
26
. AddJob ( Job . Default . WithRuntime ( ClrRuntime . Net48 ) )
27
- . AddJob ( Job . Default . WithRuntime ( CoreRuntime . Core31 ) )
27
+ . AddJob ( Job . Default . WithRuntime ( CoreRuntime . Core50 ) )
28
28
. AddExporter ( DefaultExporters . Csv ) ;
29
29
30
30
var summary = BenchmarkRunner . Run < MySqlClient > ( customConfig ) ;
@@ -76,6 +76,8 @@ create table benchmark.blobs(
76
76
var mySqlConnector = new MySqlConnector . MySqlConnection ( s_connectionString ) ;
77
77
mySqlConnector . Open ( ) ;
78
78
m_connections . Add ( "MySqlConnector" , mySqlConnector ) ;
79
+
80
+ Connection = m_connections [ Library ] ;
79
81
}
80
82
81
83
[ GlobalCleanup ]
@@ -181,7 +183,7 @@ private int ReadAllRowsSync(string sql)
181
183
return total ;
182
184
}
183
185
184
- private DbConnection Connection => m_connections [ Library ] ;
186
+ private DbConnection Connection { get ; set ; }
185
187
186
188
// TODO: move to config file
187
189
static string s_connectionString = "server=127.0.0.1;user id=root;password=pass;port=3306;ssl mode=none;Use Affected Rows=true;Connection Reset=false;Default Command Timeout=0;AutoEnlist=false;" ;
You can’t perform that action at this time.
0 commit comments