Revert "Add DfaMatcherBuilder benchmarks (#764)"
This reverts commit ec11d0578c.
This commit is contained in:
parent
ec11d0578c
commit
f9f80e3d80
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
using System.Threading.Tasks;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
|
||||
namespace Microsoft.AspNetCore.Routing.Matching
|
||||
{
|
||||
// Generated from https://github.com/Azure/azure-rest-api-specs
|
||||
public class MatcherAzureBenchmark : MatcherAzureBenchmarkBase
|
||||
public partial class MatcherAzureBenchmark : EndpointRoutingBenchmarkBase
|
||||
{
|
||||
private const int SampleCount = 100;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ using Microsoft.AspNetCore.Http;
|
|||
namespace Microsoft.AspNetCore.Routing.Matching
|
||||
{
|
||||
// This code was generated by the Swaggatherer
|
||||
public abstract partial class MatcherAzureBenchmarkBase : EndpointRoutingBenchmarkBase
|
||||
public partial class MatcherAzureBenchmark : EndpointRoutingBenchmarkBase
|
||||
{
|
||||
private protected const int EndpointCount = 5160;
|
||||
private const int EndpointCount = 5160;
|
||||
|
||||
private protected void SetupEndpoints()
|
||||
private void SetupEndpoints()
|
||||
{
|
||||
Endpoints = new RouteEndpoint[5160];
|
||||
Endpoints[0] = CreateEndpoint("/account", "GET");
|
||||
|
|
@ -5176,7 +5176,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
Endpoints[5159] = CreateEndpoint("/{tenantID}/groups/{groupObjectId}/$links/members/{memberObjectId}", "DELETE");
|
||||
}
|
||||
|
||||
private protected void SetupRequests()
|
||||
private void SetupRequests()
|
||||
{
|
||||
Requests = new HttpContext[5160];
|
||||
Requests[0] = new DefaultHttpContext();
|
||||
|
|
@ -25821,7 +25821,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
Requests[5159].Request.Path = "/67fb987d/groups/04d01a8c-6135/$links/members/71b75dbe-0076-";
|
||||
}
|
||||
|
||||
private protected Matcher SetupMatcher(MatcherBuilder builder)
|
||||
private Matcher SetupMatcher(MatcherBuilder builder)
|
||||
{
|
||||
builder.AddEndpoint(Endpoints[0]);
|
||||
builder.AddEndpoint(Endpoints[1]);
|
||||
|
|
@ -1,31 +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 System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNetCore.Routing.Matching
|
||||
{
|
||||
// Generated from https://github.com/APIs-guru/openapi-directory
|
||||
// Use https://editor2.swagger.io/ to convert from yaml to json-
|
||||
public class MatcherBuilderAzureBenchmark : MatcherAzureBenchmarkBase
|
||||
{
|
||||
private IServiceProvider _services;
|
||||
|
||||
[GlobalSetup]
|
||||
public void Setup()
|
||||
{
|
||||
SetupEndpoints();
|
||||
|
||||
_services = CreateServices();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void Dfa()
|
||||
{
|
||||
var builder = _services.GetRequiredService<DfaMatcherBuilder>();
|
||||
SetupMatcher(builder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +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 System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNetCore.Routing.Matching
|
||||
{
|
||||
// Generated from https://github.com/APIs-guru/openapi-directory
|
||||
// Use https://editor2.swagger.io/ to convert from yaml to json-
|
||||
public class MatcherBuilderGithubBenchmark : MatcherGithubBenchmarkBase
|
||||
{
|
||||
private IServiceProvider _services;
|
||||
|
||||
[GlobalSetup]
|
||||
public void Setup()
|
||||
{
|
||||
SetupEndpoints();
|
||||
|
||||
_services = CreateServices();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void Dfa()
|
||||
{
|
||||
var builder = _services.GetRequiredService<DfaMatcherBuilder>();
|
||||
SetupMatcher(builder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +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 System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNetCore.Routing.Matching
|
||||
{
|
||||
public partial class MatcherBuilderMultipleEntryBenchmark : EndpointRoutingBenchmarkBase
|
||||
{
|
||||
private IServiceProvider _services;
|
||||
|
||||
[GlobalSetup]
|
||||
public void Setup()
|
||||
{
|
||||
Endpoints = new RouteEndpoint[10];
|
||||
Endpoints[0] = CreateEndpoint("/product", "GET");
|
||||
Endpoints[1] = CreateEndpoint("/product/{id}", "GET");
|
||||
|
||||
Endpoints[2] = CreateEndpoint("/account", "GET");
|
||||
Endpoints[3] = CreateEndpoint("/account/{id}");
|
||||
Endpoints[4] = CreateEndpoint("/account/{id}", "POST");
|
||||
Endpoints[5] = CreateEndpoint("/account/{id}", "UPDATE");
|
||||
|
||||
Endpoints[6] = CreateEndpoint("/v2/account", "GET");
|
||||
Endpoints[7] = CreateEndpoint("/v2/account/{id}");
|
||||
Endpoints[8] = CreateEndpoint("/v2/account/{id}", "POST");
|
||||
Endpoints[9] = CreateEndpoint("/v2/account/{id}", "UPDATE");
|
||||
|
||||
_services = CreateServices();
|
||||
}
|
||||
|
||||
private Matcher SetupMatcher(MatcherBuilder builder)
|
||||
{
|
||||
for (int i = 0; i < Endpoints.Length; i++)
|
||||
{
|
||||
builder.AddEndpoint(Endpoints[i]);
|
||||
}
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void Dfa()
|
||||
{
|
||||
var builder = _services.GetRequiredService<DfaMatcherBuilder>();
|
||||
SetupMatcher(builder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
{
|
||||
// Generated from https://github.com/APIs-guru/openapi-directory
|
||||
// Use https://editor2.swagger.io/ to convert from yaml to json-
|
||||
public class MatcherGithubBenchmark : MatcherGithubBenchmarkBase
|
||||
public partial class MatcherGithubBenchmark : EndpointRoutingBenchmarkBase
|
||||
{
|
||||
private BarebonesMatcher _baseline;
|
||||
private Matcher _dfa;
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ using Microsoft.AspNetCore.Http;
|
|||
namespace Microsoft.AspNetCore.Routing.Matching
|
||||
{
|
||||
// This code was generated by the Swaggatherer
|
||||
public partial class MatcherGithubBenchmarkBase : EndpointRoutingBenchmarkBase
|
||||
public partial class MatcherGithubBenchmark : EndpointRoutingBenchmarkBase
|
||||
{
|
||||
private protected const int EndpointCount = 243;
|
||||
private const int EndpointCount = 243;
|
||||
|
||||
private protected void SetupEndpoints()
|
||||
private void SetupEndpoints()
|
||||
{
|
||||
Endpoints = new RouteEndpoint[243];
|
||||
Endpoints[0] = CreateEndpoint("/emojis", "GET");
|
||||
|
|
@ -259,7 +259,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
Endpoints[242] = CreateEndpoint("/repos/{owner}/{repo}/{archive_format}/{path}", "GET");
|
||||
}
|
||||
|
||||
private protected void SetupRequests()
|
||||
private void SetupRequests()
|
||||
{
|
||||
Requests = new HttpContext[243];
|
||||
Requests[0] = new DefaultHttpContext();
|
||||
|
|
@ -1236,7 +1236,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
Requests[242].Request.Path = "/repos/21a74/f36c8/805b0492-b723-/680ad";
|
||||
}
|
||||
|
||||
private protected Matcher SetupMatcher(MatcherBuilder builder)
|
||||
private Matcher SetupMatcher(MatcherBuilder builder)
|
||||
{
|
||||
builder.AddEndpoint(Endpoints[0]);
|
||||
builder.AddEndpoint(Endpoints[1]);
|
||||
|
|
@ -74,21 +74,21 @@ namespace Microsoft.AspNetCore.Routing
|
|||
// This code was generated by the Swaggatherer
|
||||
public partial class GeneratedBenchmark : EndpointRoutingBenchmarkBase
|
||||
{{
|
||||
private protected const int EndpointCount = {3};
|
||||
private const int EndpointCount = {3};
|
||||
|
||||
private protected void SetupEndpoints()
|
||||
private void SetupEndpoints()
|
||||
{{
|
||||
Endpoints = new RouteEndpoint[{3}];
|
||||
{0}
|
||||
}}
|
||||
|
||||
private protected void SetupRequests()
|
||||
private void SetupRequests()
|
||||
{{
|
||||
Requests = new HttpContext[{3}];
|
||||
{1}
|
||||
}}
|
||||
|
||||
private protected Matcher SetupMatcher(MatcherBuilder builder)
|
||||
private Matcher SetupMatcher(MatcherBuilder builder)
|
||||
{{
|
||||
{2}
|
||||
return builder.Build();
|
||||
|
|
|
|||
Loading…
Reference in New Issue