Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using BenchmarkDotNet.Running;
- using BenchmarkDotNet.Configs;
- using BenchmarkDotNet.Jobs;
- using BenchmarkDotNet.Toolchains.CsProj;
- using BenchmarkDotNet.Toolchains.DotNetCli;
- using BenchmarkDotNet.Environments;
- using BenchmarkDotNet.Columns;
- using BenchmarkDotNet.Diagnosers;
- using BenchmarkDotNet.Exporters;
- using BenchmarkDotNet.Loggers;
- namespace StringSplit
- {
- class Program
- {
- static void Main(string[] args)
- {
- BenchmarkRunner.Run<AnyYourBenchmark>(new MultipleRuntimesConfig());
- }
- }
- public class MultipleRuntimesConfig : ManualConfig
- {
- public MultipleRuntimesConfig()
- {
- Add(Job.Default
- .With(CsProjClassicNetToolchain.Net47)
- .WithId(".NET 4.7")
- );
- Add(Job.Default
- .With(CsProjCoreToolchain.NetCoreApp20)
- );
- Add(Job.Default
- .With(Runtime.Core)
- .With(CsProjCoreToolchain.From(new NetCoreAppSettings(
- targetFrameworkMoniker: "netcoreapp2.1",
- runtimeFrameworkVersion: "2.1.0-preview1-26112-04", // <-- Adjust version here
- name: "Core 2.1.0-preview")))
- );
- Add(DefaultColumnProviders.Instance);
- Add(MarkdownExporter.GitHub);
- Add(new ConsoleLogger());
- Add(new HtmlExporter());
- Add(MemoryDiagnoser.Default);
- }
- }
- }
Add Comment
Please, Sign In to add comment