File: src\Shared\BenchmarkRunner\DefaultCoreProfileConfig.cs
Web Access
Project: src\src\Http\WebUtilities\perf\Microbenchmarks\Microsoft.AspNetCore.WebUtilities.Microbenchmarks.csproj (Microsoft.AspNetCore.WebUtilities.Microbenchmarks)
// 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.Validators;
 
namespace BenchmarkDotNet.Attributes;
 
internal sealed class DefaultCoreProfileConfig : ManualConfig
{
    public DefaultCoreProfileConfig()
    {
        AddLogger(ConsoleLogger.Default);
        AddExporter(MarkdownExporter.GitHub);
 
        AddDiagnoser(MemoryDiagnoser.Default);
        AddColumn(StatisticColumn.OperationsPerSecond);
        AddColumnProvider(DefaultColumnProviders.Instance);
 
        AddValidator(JitOptimizationsValidator.FailOnError);
 
        AddJob(Job.InProcess
            .WithStrategy(RunStrategy.Throughput));
    }
}