// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Toolchains.CsProj;
using BenchmarkDotNet.Toolchains.DotNetCli;
using BenchmarkDotNet.Validators;
namespace BenchmarkDotNet.Attributes;
internal sealed class FirstRequestConfig : ManualConfig
{
public FirstRequestConfig()
{
AddLogger(ConsoleLogger.Default);
AddExporter(MarkdownExporter.GitHub);
AddDiagnoser(MemoryDiagnoser.Default);
AddColumn(StatisticColumn.OperationsPerSecond);
AddColumnProvider(DefaultColumnProviders.Instance);
AddValidator(JitOptimizationsValidator.FailOnError);
AddJob(Job.Default
.WithToolchain(CsProjCoreToolchain.From(NetCoreAppSettings.NetCoreApp21))
.WithGcMode(new GcMode { Server = true })
.WithIterationCount(10)
.WithInvocationCount(1)
.WithUnrollFactor(1)
.WithStrategy(RunStrategy.ColdStart));
}
}
|