Skip to content

Commit 1527699

Browse files
committed
Add Benchmark project.
This compares the current code to MySql.Data 6.9.9. Currently only built for the full framework in order to use "extern alias" to reference both MySQL client libraries.
1 parent 6ec4c71 commit 1527699

File tree

10 files changed

+497
-1
lines changed

10 files changed

+497
-1
lines changed

.ci/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if (!(Test-Path $buildFolder)) {
6161
}
6262
}
6363

64-
$dotnetVersion = "1.0.0"
64+
$dotnetVersion = "1.0.3"
6565
$dotnetChannel = "rel-1.0.0"
6666
$dotnetSharedRuntimeVersion = "1.1.1"
6767
$dotnetSharedRuntimeChannel = "rel-1.0.0"

.ci/test.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,12 @@ dotnet test tests\SideBySide\SideBySide.csproj -c Baseline
5151
if ($LASTEXITCODE -ne 0){
5252
exit $LASTEXITCODE;
5353
}
54+
55+
echo "Building Benchmark"
56+
57+
& "nuget.exe" restore tests\Benchmark\Benchmark.sln
58+
& "msbuild.exe" tests\Benchmark\Benchmark.sln /p:Configuration=Release
59+
if ($LASTEXITCODE -ne 0){
60+
exit $LASTEXITCODE;
61+
}
62+
.\tests\Benchmark\bin\Release\Benchmark.exe

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ignore output folders
2+
BenchmarkDotNet.Artifacts/
23
bin/
34
build/
45
obj/

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
image: Visual Studio 2017
12
services:
23
- mysql
34
build_script:

tests/Benchmark/App.config

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<dependentAssembly>
9+
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
10+
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
11+
</dependentAssembly>
12+
<dependentAssembly>
13+
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
14+
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
15+
</dependentAssembly>
16+
</assemblyBinding>
17+
</runtime>
18+
<system.data>
19+
<DbProviderFactories>
20+
<remove invariant="MySql.Data.MySqlClient" />
21+
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
22+
</DbProviderFactories>
23+
</system.data></configuration>

tests/Benchmark/Benchmark.csproj

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{102C06D1-ADB7-4661-9EC5-F6460BFEDB2A}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Benchmark</RootNamespace>
11+
<AssemblyName>Benchmark</AssemblyName>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<Prefer32Bit>false</Prefer32Bit>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
<Prefer32Bit>false</Prefer32Bit>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="BenchmarkDotNet, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
39+
<HintPath>packages\BenchmarkDotNet.0.10.3\lib\net45\BenchmarkDotNet.dll</HintPath>
40+
<Private>True</Private>
41+
</Reference>
42+
<Reference Include="BenchmarkDotNet.Core, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
43+
<HintPath>packages\BenchmarkDotNet.Core.0.10.3\lib\net45\BenchmarkDotNet.Core.dll</HintPath>
44+
<Private>True</Private>
45+
</Reference>
46+
<Reference Include="BenchmarkDotNet.Toolchains.Roslyn, Version=0.10.3.0, Culture=neutral, PublicKeyToken=aa0ca2f9092cefc4, processorArchitecture=MSIL">
47+
<HintPath>packages\BenchmarkDotNet.Toolchains.Roslyn.0.10.3\lib\net45\BenchmarkDotNet.Toolchains.Roslyn.dll</HintPath>
48+
<Private>True</Private>
49+
</Reference>
50+
<Reference Include="Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51+
<HintPath>packages\Microsoft.CodeAnalysis.Common.1.3.2\lib\net45\Microsoft.CodeAnalysis.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
54+
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55+
<HintPath>packages\Microsoft.CodeAnalysis.CSharp.1.3.2\lib\net45\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
56+
<Private>True</Private>
57+
</Reference>
58+
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
59+
<HintPath>packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
60+
<Private>True</Private>
61+
<Aliases>MySqlData</Aliases>
62+
</Reference>
63+
<Reference Include="System" />
64+
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
65+
<HintPath>packages\System.AppContext.4.1.0\lib\net46\System.AppContext.dll</HintPath>
66+
<Private>True</Private>
67+
</Reference>
68+
<Reference Include="System.Collections.Immutable, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
69+
<HintPath>packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
70+
<Private>True</Private>
71+
</Reference>
72+
<Reference Include="System.ComponentModel.Composition" />
73+
<Reference Include="System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
74+
<HintPath>packages\System.Console.4.0.0\lib\net46\System.Console.dll</HintPath>
75+
<Private>True</Private>
76+
</Reference>
77+
<Reference Include="System.Core" />
78+
<Reference Include="System.Diagnostics.FileVersionInfo, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
79+
<HintPath>packages\System.Diagnostics.FileVersionInfo.4.0.0\lib\net46\System.Diagnostics.FileVersionInfo.dll</HintPath>
80+
<Private>True</Private>
81+
</Reference>
82+
<Reference Include="System.Diagnostics.StackTrace, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
83+
<HintPath>packages\System.Diagnostics.StackTrace.4.0.1\lib\net46\System.Diagnostics.StackTrace.dll</HintPath>
84+
<Private>True</Private>
85+
</Reference>
86+
<Reference Include="System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
87+
<HintPath>packages\System.IO.FileSystem.4.0.1\lib\net46\System.IO.FileSystem.dll</HintPath>
88+
<Private>True</Private>
89+
</Reference>
90+
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
91+
<HintPath>packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
92+
<Private>True</Private>
93+
</Reference>
94+
<Reference Include="System.Numerics" />
95+
<Reference Include="System.Reflection.Metadata, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
96+
<HintPath>packages\System.Reflection.Metadata.1.3.0\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
97+
<Private>True</Private>
98+
</Reference>
99+
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
100+
<HintPath>packages\System.Security.Cryptography.Algorithms.4.2.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
101+
<Private>True</Private>
102+
</Reference>
103+
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
104+
<HintPath>packages\System.Security.Cryptography.Encoding.4.0.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
105+
<Private>True</Private>
106+
</Reference>
107+
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
108+
<HintPath>packages\System.Security.Cryptography.Primitives.4.0.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
109+
<Private>True</Private>
110+
</Reference>
111+
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
112+
<HintPath>packages\System.Security.Cryptography.X509Certificates.4.1.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
113+
<Private>True</Private>
114+
</Reference>
115+
<Reference Include="System.Text.Encoding.CodePages, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
116+
<HintPath>packages\System.Text.Encoding.CodePages.4.0.1\lib\net46\System.Text.Encoding.CodePages.dll</HintPath>
117+
<Private>True</Private>
118+
</Reference>
119+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
120+
<HintPath>packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
121+
<Private>True</Private>
122+
</Reference>
123+
<Reference Include="System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
124+
<HintPath>packages\System.Threading.Thread.4.0.0\lib\net46\System.Threading.Thread.dll</HintPath>
125+
<Private>True</Private>
126+
</Reference>
127+
<Reference Include="System.Xml.Linq" />
128+
<Reference Include="System.Data.DataSetExtensions" />
129+
<Reference Include="Microsoft.CSharp" />
130+
<Reference Include="System.Data" />
131+
<Reference Include="System.Net.Http" />
132+
<Reference Include="System.Xml" />
133+
<Reference Include="System.Xml.XmlDocument, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
134+
<HintPath>packages\System.Xml.XmlDocument.4.0.1\lib\net46\System.Xml.XmlDocument.dll</HintPath>
135+
<Private>True</Private>
136+
</Reference>
137+
<Reference Include="System.Xml.XPath, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
138+
<HintPath>packages\System.Xml.XPath.4.0.1\lib\net46\System.Xml.XPath.dll</HintPath>
139+
<Private>True</Private>
140+
</Reference>
141+
<Reference Include="System.Xml.XPath.XDocument, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
142+
<HintPath>packages\System.Xml.XPath.XDocument.4.0.1\lib\net46\System.Xml.XPath.XDocument.dll</HintPath>
143+
<Private>True</Private>
144+
</Reference>
145+
</ItemGroup>
146+
<ItemGroup>
147+
<Compile Include="Program.cs" />
148+
<Compile Include="Properties\AssemblyInfo.cs" />
149+
</ItemGroup>
150+
<ItemGroup>
151+
<None Include="App.config" />
152+
<None Include="packages.config" />
153+
</ItemGroup>
154+
<ItemGroup>
155+
<Analyzer Include="packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
156+
<Analyzer Include="packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
157+
</ItemGroup>
158+
<ItemGroup>
159+
<ProjectReference Include="..\..\src\MySqlConnector\MySqlConnector.csproj">
160+
<Project>{6b4fea15-4504-4bf7-b157-cef9b60cfe13}</Project>
161+
<Name>MySqlConnector</Name>
162+
<Aliases>MySqlConnector</Aliases>
163+
</ProjectReference>
164+
</ItemGroup>
165+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
166+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
167+
Other similar extension points exist, see Microsoft.Common.targets.
168+
<Target Name="BeforeBuild">
169+
</Target>
170+
<Target Name="AfterBuild">
171+
</Target>
172+
-->
173+
</Project>

tests/Benchmark/Benchmark.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26403.7
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmark", "Benchmark.csproj", "{102C06D1-ADB7-4661-9EC5-F6460BFEDB2A}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MySqlConnector", "..\..\src\MySqlConnector\MySqlConnector.csproj", "{6B4FEA15-4504-4BF7-B157-CEF9B60CFE13}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{102C06D1-ADB7-4661-9EC5-F6460BFEDB2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{102C06D1-ADB7-4661-9EC5-F6460BFEDB2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{102C06D1-ADB7-4661-9EC5-F6460BFEDB2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{102C06D1-ADB7-4661-9EC5-F6460BFEDB2A}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{6B4FEA15-4504-4BF7-B157-CEF9B60CFE13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{6B4FEA15-4504-4BF7-B157-CEF9B60CFE13}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{6B4FEA15-4504-4BF7-B157-CEF9B60CFE13}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{6B4FEA15-4504-4BF7-B157-CEF9B60CFE13}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

0 commit comments

Comments
 (0)