mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 14:58:16 +08:00
Rename all ReRoute to Route to move closer to YARP +semver: breaking
This commit is contained in:
@ -1,156 +1,156 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Validators;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using Ocelot.Configuration.File;
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.Middleware;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ocelot.Benchmarks
|
||||
{
|
||||
[Config(typeof(AllTheThingsBenchmarks))]
|
||||
public class AllTheThingsBenchmarks : ManualConfig
|
||||
{
|
||||
private IWebHost _service;
|
||||
private IWebHost _ocelot;
|
||||
private HttpClient _httpClient;
|
||||
|
||||
public AllTheThingsBenchmarks()
|
||||
{
|
||||
Add(StatisticColumn.AllStatistics);
|
||||
Add(MemoryDiagnoser.Default);
|
||||
Add(BaselineValidator.FailOnError);
|
||||
}
|
||||
|
||||
[GlobalSetup]
|
||||
public void SetUp()
|
||||
{
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
{
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 201, string.Empty);
|
||||
GivenThereIsAConfiguration(configuration);
|
||||
GivenOcelotIsRunning("http://localhost:5000");
|
||||
|
||||
_httpClient = new HttpClient();
|
||||
}
|
||||
|
||||
[Benchmark(Baseline = true)]
|
||||
public async Task Baseline()
|
||||
{
|
||||
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:5000/");
|
||||
var response = await _httpClient.SendAsync(request);
|
||||
response.EnsureSuccessStatusCode();
|
||||
}
|
||||
|
||||
/* * Summary*
|
||||
BenchmarkDotNet = v0.10.13, OS = macOS 10.12.6 (16G1212) [Darwin 16.7.0]
|
||||
Intel Core i5-4278U CPU 2.60GHz(Haswell), 1 CPU, 4 logical cores and 2 physical cores
|
||||
.NET Core SDK = 2.1.4
|
||||
|
||||
[Host] : .NET Core 2.0.6 (CoreCLR 4.6.0.0, CoreFX 4.6.26212.01), 64bit RyuJIT
|
||||
DefaultJob : .NET Core 2.0.6 (CoreCLR 4.6.0.0, CoreFX 4.6.26212.01), 64bit RyuJIT
|
||||
Method | Mean | Error | StdDev | StdErr | Min | Q1 | Median | Q3 | Max | Op/s | Scaled | Gen 0 | Gen 1 | Allocated |
|
||||
--------- |---------:|----------:|----------:|----------:|---------:|---------:|---------:|---------:|---------:|------:|-------:|--------:|-------:|----------:|
|
||||
Baseline | 2.102 ms | 0.0292 ms | 0.0273 ms | 0.0070 ms | 2.063 ms | 2.080 ms | 2.093 ms | 2.122 ms | 2.152 ms | 475.8 | 1.00 | 31.2500 | 3.9063 | 1.63 KB |*/
|
||||
|
||||
private void GivenOcelotIsRunning(string url)
|
||||
{
|
||||
_ocelot = new WebHostBuilder()
|
||||
.UseKestrel()
|
||||
.UseUrls(url)
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.ConfigureAppConfiguration((hostingContext, config) =>
|
||||
{
|
||||
config
|
||||
.SetBasePath(hostingContext.HostingEnvironment.ContentRootPath)
|
||||
.AddJsonFile("appsettings.json", true, true)
|
||||
.AddJsonFile($"appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", true, true)
|
||||
.AddJsonFile("ocelot.json", false, false)
|
||||
.AddEnvironmentVariables();
|
||||
})
|
||||
.ConfigureServices(s =>
|
||||
{
|
||||
s.AddOcelot();
|
||||
})
|
||||
.ConfigureLogging((hostingContext, logging) =>
|
||||
{
|
||||
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||
})
|
||||
.UseIISIntegration()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UseOcelot().Wait();
|
||||
})
|
||||
.Build();
|
||||
|
||||
_ocelot.Start();
|
||||
}
|
||||
|
||||
public void GivenThereIsAConfiguration(FileConfiguration fileConfiguration)
|
||||
{
|
||||
var configurationPath = Path.Combine(AppContext.BaseDirectory, "ocelot.json");
|
||||
|
||||
var jsonConfiguration = JsonConvert.SerializeObject(fileConfiguration);
|
||||
|
||||
if (File.Exists(configurationPath))
|
||||
{
|
||||
File.Delete(configurationPath);
|
||||
}
|
||||
|
||||
File.WriteAllText(configurationPath, jsonConfiguration);
|
||||
}
|
||||
|
||||
private void GivenThereIsAServiceRunningOn(string baseUrl, string basePath, int statusCode, string responseBody)
|
||||
{
|
||||
_service = new WebHostBuilder()
|
||||
.UseUrls(baseUrl)
|
||||
.UseKestrel()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISIntegration()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UsePathBase(basePath);
|
||||
app.Run(async context =>
|
||||
{
|
||||
context.Response.StatusCode = statusCode;
|
||||
await context.Response.WriteAsync(responseBody);
|
||||
});
|
||||
})
|
||||
.Build();
|
||||
|
||||
_service.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Validators;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using Ocelot.Configuration.File;
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.Middleware;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ocelot.Benchmarks
|
||||
{
|
||||
[Config(typeof(AllTheThingsBenchmarks))]
|
||||
public class AllTheThingsBenchmarks : ManualConfig
|
||||
{
|
||||
private IWebHost _service;
|
||||
private IWebHost _ocelot;
|
||||
private HttpClient _httpClient;
|
||||
|
||||
public AllTheThingsBenchmarks()
|
||||
{
|
||||
Add(StatisticColumn.AllStatistics);
|
||||
Add(MemoryDiagnoser.Default);
|
||||
Add(BaselineValidator.FailOnError);
|
||||
}
|
||||
|
||||
[GlobalSetup]
|
||||
public void SetUp()
|
||||
{
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
{
|
||||
new FileHostAndPort
|
||||
{
|
||||
Host = "localhost",
|
||||
Port = 51879,
|
||||
}
|
||||
},
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
GivenThereIsAServiceRunningOn("http://localhost:51879", "/", 201, string.Empty);
|
||||
GivenThereIsAConfiguration(configuration);
|
||||
GivenOcelotIsRunning("http://localhost:5000");
|
||||
|
||||
_httpClient = new HttpClient();
|
||||
}
|
||||
|
||||
[Benchmark(Baseline = true)]
|
||||
public async Task Baseline()
|
||||
{
|
||||
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:5000/");
|
||||
var response = await _httpClient.SendAsync(request);
|
||||
response.EnsureSuccessStatusCode();
|
||||
}
|
||||
|
||||
/* * Summary*
|
||||
BenchmarkDotNet = v0.10.13, OS = macOS 10.12.6 (16G1212) [Darwin 16.7.0]
|
||||
Intel Core i5-4278U CPU 2.60GHz(Haswell), 1 CPU, 4 logical cores and 2 physical cores
|
||||
.NET Core SDK = 2.1.4
|
||||
|
||||
[Host] : .NET Core 2.0.6 (CoreCLR 4.6.0.0, CoreFX 4.6.26212.01), 64bit RyuJIT
|
||||
DefaultJob : .NET Core 2.0.6 (CoreCLR 4.6.0.0, CoreFX 4.6.26212.01), 64bit RyuJIT
|
||||
Method | Mean | Error | StdDev | StdErr | Min | Q1 | Median | Q3 | Max | Op/s | Scaled | Gen 0 | Gen 1 | Allocated |
|
||||
--------- |---------:|----------:|----------:|----------:|---------:|---------:|---------:|---------:|---------:|------:|-------:|--------:|-------:|----------:|
|
||||
Baseline | 2.102 ms | 0.0292 ms | 0.0273 ms | 0.0070 ms | 2.063 ms | 2.080 ms | 2.093 ms | 2.122 ms | 2.152 ms | 475.8 | 1.00 | 31.2500 | 3.9063 | 1.63 KB |*/
|
||||
|
||||
private void GivenOcelotIsRunning(string url)
|
||||
{
|
||||
_ocelot = new WebHostBuilder()
|
||||
.UseKestrel()
|
||||
.UseUrls(url)
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.ConfigureAppConfiguration((hostingContext, config) =>
|
||||
{
|
||||
config
|
||||
.SetBasePath(hostingContext.HostingEnvironment.ContentRootPath)
|
||||
.AddJsonFile("appsettings.json", true, true)
|
||||
.AddJsonFile($"appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", true, true)
|
||||
.AddJsonFile("ocelot.json", false, false)
|
||||
.AddEnvironmentVariables();
|
||||
})
|
||||
.ConfigureServices(s =>
|
||||
{
|
||||
s.AddOcelot();
|
||||
})
|
||||
.ConfigureLogging((hostingContext, logging) =>
|
||||
{
|
||||
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
||||
})
|
||||
.UseIISIntegration()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UseOcelot().Wait();
|
||||
})
|
||||
.Build();
|
||||
|
||||
_ocelot.Start();
|
||||
}
|
||||
|
||||
public void GivenThereIsAConfiguration(FileConfiguration fileConfiguration)
|
||||
{
|
||||
var configurationPath = Path.Combine(AppContext.BaseDirectory, "ocelot.json");
|
||||
|
||||
var jsonConfiguration = JsonConvert.SerializeObject(fileConfiguration);
|
||||
|
||||
if (File.Exists(configurationPath))
|
||||
{
|
||||
File.Delete(configurationPath);
|
||||
}
|
||||
|
||||
File.WriteAllText(configurationPath, jsonConfiguration);
|
||||
}
|
||||
|
||||
private void GivenThereIsAServiceRunningOn(string baseUrl, string basePath, int statusCode, string responseBody)
|
||||
{
|
||||
_service = new WebHostBuilder()
|
||||
.UseUrls(baseUrl)
|
||||
.UseKestrel()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISIntegration()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UsePathBase(basePath);
|
||||
app.Run(async context =>
|
||||
{
|
||||
context.Response.StatusCode = statusCode;
|
||||
await context.Response.WriteAsync(responseBody);
|
||||
});
|
||||
})
|
||||
.Build();
|
||||
|
||||
_service.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,77 +1,76 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Validators;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Ocelot.Benchmarks
|
||||
{
|
||||
using Configuration;
|
||||
using Configuration.Builder;
|
||||
using Requester;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
[Config(typeof(DictionaryBenchmarks))]
|
||||
public class DictionaryBenchmarks : ManualConfig
|
||||
{
|
||||
private ConcurrentDictionary<DownstreamReRoute, IHttpClient> _downstreamReRouteDictionary;
|
||||
private ConcurrentDictionary<string, IHttpClient> _stringReRouteDictionary;
|
||||
private HttpClientWrapper _client;
|
||||
private string _stringKey;
|
||||
private DownstreamReRoute _downstreamReRouteKey;
|
||||
|
||||
public DictionaryBenchmarks()
|
||||
{
|
||||
Add(StatisticColumn.AllStatistics);
|
||||
Add(MemoryDiagnoser.Default);
|
||||
Add(BaselineValidator.FailOnError);
|
||||
}
|
||||
|
||||
[GlobalSetup]
|
||||
public void SetUp()
|
||||
{
|
||||
_downstreamReRouteKey = new DownstreamReRouteBuilder().Build();
|
||||
_stringKey = "test";
|
||||
_client = new HttpClientWrapper(new HttpClient());
|
||||
_downstreamReRouteDictionary = new ConcurrentDictionary<DownstreamReRoute, IHttpClient>();
|
||||
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamReRouteDictionary.TryAdd(new DownstreamReRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
|
||||
_stringReRouteDictionary = new ConcurrentDictionary<string, IHttpClient>();
|
||||
_stringReRouteDictionary.TryAdd("1", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("2", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("3", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("4", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("5", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("6", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("7", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("8", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("9", new HttpClientWrapper(new HttpClient()));
|
||||
_stringReRouteDictionary.TryAdd("10", new HttpClientWrapper(new HttpClient()));
|
||||
}
|
||||
|
||||
[Benchmark(Baseline = true)]
|
||||
public IHttpClient StringKey()
|
||||
{
|
||||
_stringReRouteDictionary.AddOrUpdate(_stringKey, _client, (k, oldValue) => _client);
|
||||
return _stringReRouteDictionary.TryGetValue(_stringKey, out var client) ? client : null;
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public IHttpClient DownstreamReRouteKey()
|
||||
{
|
||||
_downstreamReRouteDictionary.AddOrUpdate(_downstreamReRouteKey, _client, (k, oldValue) => _client);
|
||||
return _downstreamReRouteDictionary.TryGetValue(_downstreamReRouteKey, out var client) ? client : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace Ocelot.Benchmarks
|
||||
{
|
||||
using Ocelot.Configuration;
|
||||
using Ocelot.Configuration.Builder;
|
||||
using Ocelot.Requester;
|
||||
using System.Collections.Concurrent;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Validators;
|
||||
using System.Net.Http;
|
||||
|
||||
[Config(typeof(DictionaryBenchmarks))]
|
||||
public class DictionaryBenchmarks : ManualConfig
|
||||
{
|
||||
private ConcurrentDictionary<DownstreamRoute, IHttpClient> _downstreamRouteDictionary;
|
||||
private ConcurrentDictionary<string, IHttpClient> _stringRouteDictionary;
|
||||
private HttpClientWrapper _client;
|
||||
private string _stringKey;
|
||||
private DownstreamRoute _downstreamRouteKey;
|
||||
|
||||
public DictionaryBenchmarks()
|
||||
{
|
||||
Add(StatisticColumn.AllStatistics);
|
||||
Add(MemoryDiagnoser.Default);
|
||||
Add(BaselineValidator.FailOnError);
|
||||
}
|
||||
|
||||
[GlobalSetup]
|
||||
public void SetUp()
|
||||
{
|
||||
_downstreamRouteKey = new DownstreamRouteBuilder().Build();
|
||||
_stringKey = "test";
|
||||
_client = new HttpClientWrapper(new HttpClient());
|
||||
_downstreamRouteDictionary = new ConcurrentDictionary<DownstreamRoute, IHttpClient>();
|
||||
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
_downstreamRouteDictionary.TryAdd(new DownstreamRouteBuilder().Build(), new HttpClientWrapper(new HttpClient()));
|
||||
|
||||
_stringRouteDictionary = new ConcurrentDictionary<string, IHttpClient>();
|
||||
_stringRouteDictionary.TryAdd("1", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("2", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("3", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("4", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("5", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("6", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("7", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("8", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("9", new HttpClientWrapper(new HttpClient()));
|
||||
_stringRouteDictionary.TryAdd("10", new HttpClientWrapper(new HttpClient()));
|
||||
}
|
||||
|
||||
[Benchmark(Baseline = true)]
|
||||
public IHttpClient StringKey()
|
||||
{
|
||||
_stringRouteDictionary.AddOrUpdate(_stringKey, _client, (k, oldValue) => _client);
|
||||
return _stringRouteDictionary.TryGetValue(_stringKey, out var client) ? client : null;
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public IHttpClient DownstreamRouteKey()
|
||||
{
|
||||
_downstreamRouteDictionary.AddOrUpdate(_downstreamRouteKey, _client, (k, oldValue) => _client);
|
||||
return _downstreamRouteDictionary.TryGetValue(_downstreamRouteKey, out var client) ? client : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace Ocelot.Benchmarks
|
||||
httpContext.Request.Path = new PathString("/test");
|
||||
httpContext.Request.QueryString = new QueryString("?a=b");
|
||||
httpContext.Request.Headers.Add("Host", "most");
|
||||
httpContext.Items.SetIInternalConfiguration(new InternalConfiguration(new List<ReRoute>(), null, null, null, null, null, null, null, null));
|
||||
httpContext.Items.SetIInternalConfiguration(new InternalConfiguration(new List<Route>(), null, null, null, null, null, null, null, null));
|
||||
|
||||
_httpContext = httpContext;
|
||||
}
|
||||
|
Reference in New Issue
Block a user