-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMultipleRuntimesConfig.cs
More file actions
28 lines (24 loc) · 1.02 KB
/
MultipleRuntimesConfig.cs
File metadata and controls
28 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Toolchains.CsProj;
namespace StateOfTheDotNetPerformance
{
public class MultipleRuntimesConfig : ManualConfig
{
public MultipleRuntimesConfig()
{
// watch and learn how to use full power of BenchmarkDotNet!
Add(Job.Default
.With(CsProjNet46Toolchain.Instance) // Span NOT supported by Runtime
.WithId(".NET 4.6"));
Add(Job.Default
.With(CsProjCoreToolchain.NetCoreApp11) // Span NOT supported by Runtime
.WithId(".NET Core 1.1"));
/// !!! warning !!! NetCoreApp20 toolchain simply sets TargetFramework = netcoreapp2.0 in generated .csproj
/// // so you need Visual Studio 2017 Preview 15.3 to be able to run it!
Add(Job.Default
.With(CsProjCoreToolchain.NetCoreApp20) // Span SUPPORTED by Runtime
.WithId(".NET Core 2.0"));
}
}
}