Exemple #1
0
        static void Main(string[] args)
        {
            var run = Job.MediumRun;
            // var run = Job.ShortRun;
            Job jobCore21 = run.With(Jit.RyuJit).With(CoreRuntime.Core21).WithId($"Core 2.1");
            Job jobCore31 = run.With(Jit.RyuJit).With(CoreRuntime.Core31).WithId($"Core 3.1");
            Job jobCore50 = run.With(Jit.RyuJit).With(CoreRuntime.Core50).WithId($"Core 5.0");

            IConfig config = ManualConfig.Create(DefaultConfig.Instance);

            config = config.With(new[] { jobCore21, jobCore31, jobCore50 });

            MonoRuntime monoRuntime = MonoRuntime.Default;

            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                config = config.With(run.With(ClrRuntime.Net48).WithId("FW 4.8"));
            }
            else
            {
                config = config.With(new[] { run.With(Jit.Llvm).With(monoRuntime).WithId("Mono+LLVM") });
                config = config.With(new[] { run.With(monoRuntime).WithId("Mono legacy") });
            }

            config = config.With(JsonExporter.Custom(fileNameSuffix: "-full", indentJson: true, excludeMeasurements: false));
            config = config.With(JsonExporter.Custom(fileNameSuffix: "-brief", indentJson: true, excludeMeasurements: true));
            config = config.With(MarkdownExporter.Default);
            config = config.With(HtmlExporter.Default);
            config = config.With(CsvExporter.Default);

            var summary = BenchmarkRunner.Run(typeof(Program).Assembly, config);
        }
 public Config()
 {
     Add(JsonExporter.Brief);
     Add(JsonExporter.Full);
     Add(JsonExporter.BriefCompressed);
     Add(JsonExporter.FullCompressed);
     Add(JsonExporter.Custom("-custom", indentJson: true, excludeMeasurements: true));
 }
Exemple #3
0
 public ManualConfiguration()
 {
     Add(Job.Default
         .With(Runtime.Core)
         .With(CsProjCoreToolchain.NetCoreApp21)
         .With(RunStrategy.Monitoring));
     ArtifactsPath = GetPath();
     Add(MemoryDiagnoser.Default);
     Add(JsonExporter.Default);
     Add(JsonExporter.Custom("-custom", indentJson: true));
 }
Exemple #4
0
 public ManualConfiguration()
 {
     Add(Job.Default
         .With(Runtime.Core)
         .With(CsProjCoreToolchain.NetCoreApp21)
         .WithGcConcurrent(false)
         .With(RunStrategy.Monitoring)
         .WithLaunchCount(0)
         .WithWarmupCount(0)
         .WithTargetCount(10));
     ArtifactsPath = GetPath();
     Add(MemoryDiagnoser.Default);
     Add(HardwareCounter.BranchMispredictions, HardwareCounter.BranchInstructions);
     Add(JsonExporter.Default);
     Add(JsonExporter.Custom("-custom", indentJson: true));
 }