Use common BDN config (#2233)
This commit is contained in:
parent
dfaf37cbba
commit
e7cc0d33af
|
|
@ -0,0 +1 @@
|
|||
[assembly: BenchmarkDotNet.Attributes.AspNetCoreBenchmark]
|
||||
|
|
@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class DotSegmentRemovalBenchmark
|
||||
{
|
||||
// Immutable
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class Http1ConnectionParsingOverheadBenchmark
|
||||
{
|
||||
private const int InnerLoopCount = 512;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ using Microsoft.AspNetCore.Testing;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class Http1WritingBenchmark
|
||||
{
|
||||
// Standard completed task
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
|
||||
public class HttpParserBenchmark : IHttpRequestLineHandler, IHttpHeadersHandler
|
||||
{
|
||||
private readonly HttpParser<Adapter> _parser = new HttpParser<Adapter>();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class HttpProtocolFeatureCollection
|
||||
{
|
||||
private readonly Http1Connection _http1Connection;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class KnownStringsBenchmark
|
||||
{
|
||||
static byte[] _methodConnect = Encoding.ASCII.GetBytes("CONNECT ");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ using BenchmarkDotNet.Attributes;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class PipeThroughputBenchmark
|
||||
{
|
||||
private const int _writeLenght = 57;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class RequestParsingBenchmark
|
||||
{
|
||||
public IPipe Pipe { get; set; }
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class ResponseHeaderCollectionBenchmark
|
||||
{
|
||||
private const int InnerLoopCount = 512;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ using Microsoft.AspNetCore.Testing;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class ResponseHeadersWritingBenchmark
|
||||
{
|
||||
private static readonly byte[] _helloWorldPayload = Encoding.ASCII.GetBytes("Hello, World!");
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
[ParameterizedJobConfig(typeof(CoreConfig))]
|
||||
public class StringUtilitiesBenchmark
|
||||
{
|
||||
private const int Iterations = 500_000;
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Engines;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Validators;
|
||||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||
{
|
||||
public class CoreConfig : ManualConfig
|
||||
{
|
||||
public CoreConfig() : this(Job.Core
|
||||
.WithRemoveOutliers(false)
|
||||
.With(new GcMode() { Server = true })
|
||||
.With(RunStrategy.Throughput)
|
||||
.WithLaunchCount(3)
|
||||
.WithWarmupCount(5)
|
||||
.WithTargetCount(10))
|
||||
{
|
||||
Add(JitOptimizationsValidator.FailOnError);
|
||||
}
|
||||
|
||||
public CoreConfig(Job job)
|
||||
{
|
||||
Add(DefaultConfig.Instance);
|
||||
|
||||
Add(MemoryDiagnoser.Default);
|
||||
Add(StatisticColumn.OperationsPerSecond);
|
||||
|
||||
Add(job);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue