Guest User

Untitled

a guest
Jan 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. using BenchmarkDotNet.Running;
  2. using BenchmarkDotNet.Configs;
  3. using BenchmarkDotNet.Jobs;
  4. using BenchmarkDotNet.Toolchains.CsProj;
  5. using BenchmarkDotNet.Toolchains.DotNetCli;
  6. using BenchmarkDotNet.Environments;
  7. using BenchmarkDotNet.Columns;
  8. using BenchmarkDotNet.Diagnosers;
  9. using BenchmarkDotNet.Exporters;
  10. using BenchmarkDotNet.Loggers;
  11.  
  12. namespace StringSplit
  13. {
  14. class Program
  15. {
  16. static void Main(string[] args)
  17. {
  18. BenchmarkRunner.Run<AnyYourBenchmark>(new MultipleRuntimesConfig());
  19. }
  20. }
  21.  
  22. public class MultipleRuntimesConfig : ManualConfig
  23. {
  24. public MultipleRuntimesConfig()
  25. {
  26. Add(Job.Default
  27. .With(CsProjClassicNetToolchain.Net47)
  28. .WithId(".NET 4.7")
  29. );
  30.  
  31. Add(Job.Default
  32. .With(CsProjCoreToolchain.NetCoreApp20)
  33. );
  34.  
  35. Add(Job.Default
  36. .With(Runtime.Core)
  37. .With(CsProjCoreToolchain.From(new NetCoreAppSettings(
  38. targetFrameworkMoniker: "netcoreapp2.1",
  39. runtimeFrameworkVersion: "2.1.0-preview1-26112-04", // <-- Adjust version here
  40. name: "Core 2.1.0-preview")))
  41. );
  42.  
  43. Add(DefaultColumnProviders.Instance);
  44. Add(MarkdownExporter.GitHub);
  45. Add(new ConsoleLogger());
  46. Add(new HtmlExporter());
  47. Add(MemoryDiagnoser.Default);
  48. }
  49. }
  50. }
Add Comment
Please, Sign In to add comment