-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For cleaner project structure - inherited projects like in tests. Various other cleanup modifications, but no functional changes.
- Loading branch information
Showing
147 changed files
with
333 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
benchmark/EF.Benchmarks.Shared/EF.Benchmarks.Shared.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks> | ||
<RootNamespace>Microsoft.EntityFrameworkCore.Benchmarks</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="$(Configuration.StartsWith('Release'))"> | ||
<Optimize>true</Optimize> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Linq; | ||
using System.Reflection; | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Columns; | ||
using BenchmarkDotNet.Configs; | ||
using BenchmarkDotNet.Diagnosers; | ||
using BenchmarkDotNet.Exporters; | ||
using BenchmarkDotNet.Exporters.Csv; | ||
using BenchmarkDotNet.Horology; | ||
using BenchmarkDotNet.Reports; | ||
using BenchmarkDotNet.Running; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Benchmarks | ||
{ | ||
public static class EFCoreBenchmarkRunner | ||
{ | ||
public static void Run(string[] args, Assembly assembly, IConfig config = null) | ||
{ | ||
if (config == null) | ||
{ | ||
config = DefaultConfig.Instance; | ||
} | ||
|
||
config = config.With(DefaultConfig.Instance.GetDiagnosers().Concat(new[] { MemoryDiagnoser.Default }).ToArray()); | ||
|
||
var index = Array.FindIndex(args, s => s == "--perflab"); | ||
if (index >= 0) | ||
{ | ||
var argList = args.ToList(); | ||
argList.RemoveAt(index); | ||
args = argList.ToArray(); | ||
|
||
config = config | ||
.With(StatisticColumn.OperationsPerSecond, new ParamsSummaryColumn()) | ||
.With( | ||
MarkdownExporter.GitHub, new CsvExporter( | ||
CsvSeparator.Comma, | ||
new SummaryStyle | ||
{ | ||
PrintUnitsInHeader = true, | ||
PrintUnitsInContent = false, | ||
TimeUnit = TimeUnit.Microsecond, | ||
SizeUnit = SizeUnit.KB | ||
})); | ||
} | ||
|
||
BenchmarkSwitcher.FromAssembly(assembly).Run(args, config); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion
4
...s/AdventureWorks/AdventureWorksFixture.cs → ...s/AdventureWorks/AdventureWorksFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Linq; | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Columns; | ||
using BenchmarkDotNet.Configs; | ||
using BenchmarkDotNet.Diagnosers; | ||
using BenchmarkDotNet.Exporters; | ||
using BenchmarkDotNet.Exporters.Csv; | ||
using BenchmarkDotNet.Horology; | ||
using BenchmarkDotNet.Reports; | ||
using BenchmarkDotNet.Running; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Microsoft.EntityFrameworkCore.Benchmarks | ||
{ | ||
public class Program | ||
{ | ||
private static void Main(string[] args) => EFCoreBenchmarkRunner.Run(args, typeof(Program).Assembly); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
benchmark/EF6.SqlServer.Benchmarks/Support/SqlServerBenchmarkEnvironment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.IO; | ||
using System.Data.SqlClient; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Microsoft.EntityFrameworkCore.Benchmarks | ||
{ | ||
public static class SqlServerBenchmarkEnvironment | ||
{ | ||
public static IConfiguration Config { get; } | ||
|
||
static SqlServerBenchmarkEnvironment() | ||
{ | ||
var configBuilder = new ConfigurationBuilder() | ||
.SetBasePath(Directory.GetCurrentDirectory()) | ||
.AddJsonFile("config.json", optional: true) | ||
.AddEnvironmentVariables(); | ||
|
||
Config = configBuilder.Build() | ||
.GetSection("Test:SqlServer"); | ||
} | ||
|
||
private const string DefaultConnectionString | ||
= "Data Source=(localdb)\\MSSQLLocalDB;Database=master;Integrated Security=True;Connect Timeout=30;ConnectRetryCount=0"; | ||
|
||
public static string DefaultConnection => Config["DefaultConnection"] ?? DefaultConnectionString; | ||
|
||
public static string CreateConnectionString(string name, string fileName = null, bool? multipleActiveResultSets = null) | ||
=> new SqlConnectionStringBuilder(DefaultConnection) { InitialCatalog = name }.ToString(); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"benchmarks": { | ||
"benchmarkDatabase": "Server=(localdb)\\mssqllocaldb;Trusted_Connection=True;MultipleActiveResultSets=true;" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0</TargetFrameworks> | ||
<TargetFrameworks Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug' ">netcoreapp3.0</TargetFrameworks> | ||
<RootNamespace>Microsoft.EntityFrameworkCore.Benchmarks</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="$(Configuration.StartsWith('Release'))"> | ||
<Optimize>true</Optimize> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\EF.Benchmarks.Shared\EF.Benchmarks.Shared.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Debug' "> | ||
<ProjectReference Include="..\..\src\EFCore.Relational\EFCore.Relational.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(Configuration)' == 'Release22' Or '$(Configuration)' == 'Debug22' "> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(Configuration)' == 'Release21' Or '$(Configuration)' == 'Debug21' "> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.1.11" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(Configuration)' == 'Release20' Or '$(Configuration)' == 'Debug20' "> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.3" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)' == 'Release22' Or '$(Configuration)' == 'Release21' Or '$(Configuration)' == 'Release20' Or '$(Configuration)' == 'Debug22' Or '$(Configuration)' == 'Debug21' Or '$(Configuration)' == 'Debug20'"> | ||
<DefineConstants>$(DefineConstants);OLD_FROM_SQL</DefineConstants> | ||
</PropertyGroup> | ||
|
||
</Project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.