Added benchmarks project back in..tho its pointless

This commit is contained in:
TomPallister 2016-10-24 19:01:20 +01:00
parent 4427ef459f
commit d50f06fc3e
5 changed files with 64 additions and 19 deletions

View File

@ -28,6 +28,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Ocelot.AcceptanceTests", "t
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Ocelot.ManualTest", "test\Ocelot.ManualTest\Ocelot.ManualTest.xproj", "{02BBF4C5-517E-4157-8D21-4B8B9E118B7A}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Ocelot.Benchmarks", "test\Ocelot.Benchmarks\Ocelot.Benchmarks.xproj", "{AB3E458C-FD76-4DEE-8DCE-EEB5BA840AF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -50,6 +52,10 @@ Global
{02BBF4C5-517E-4157-8D21-4B8B9E118B7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02BBF4C5-517E-4157-8D21-4B8B9E118B7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02BBF4C5-517E-4157-8D21-4B8B9E118B7A}.Release|Any CPU.Build.0 = Release|Any CPU
{AB3E458C-FD76-4DEE-8DCE-EEB5BA840AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB3E458C-FD76-4DEE-8DCE-EEB5BA840AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB3E458C-FD76-4DEE-8DCE-EEB5BA840AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB3E458C-FD76-4DEE-8DCE-EEB5BA840AF6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -59,5 +65,6 @@ Global
{54E84F1A-E525-4443-96EC-039CBD50C263} = {5B401523-36DA-4491-B73A-7590A26E420B}
{F8C224FE-36BE-45F5-9B0E-666D8F4A9B52} = {5B401523-36DA-4491-B73A-7590A26E420B}
{02BBF4C5-517E-4157-8D21-4B8B9E118B7A} = {5B401523-36DA-4491-B73A-7590A26E420B}
{AB3E458C-FD76-4DEE-8DCE-EEB5BA840AF6} = {5B401523-36DA-4491-B73A-7590A26E420B}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>ab3e458c-fd76-4dee-8dce-eeb5ba840af6</ProjectGuid>
<RootNamespace>Ocelot.Benchmarks</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

View File

@ -0,0 +1,19 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ocelot.Benchmarks")]
[assembly: AssemblyTrademark("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ab3e458c-fd76-4dee-8dce-eeb5ba840af6")]

View File

@ -1,16 +1,14 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using Ocelot.Library.Infrastructure.UrlPathMatcher;
using Ocelot.DownstreamRouteFinder.UrlMatcher;
namespace Ocelot.Benchmarks
{
[Config(typeof(UrlPathToUrlPathTemplateMatcherBenchmarks))]
public class UrlPathToUrlPathTemplateMatcherBenchmarks : ManualConfig
{
private UrlPathToUrlPathTemplateMatcher _urlPathMatcher;
private RegExUrlMatcher _urlPathMatcher;
private string _downstreamUrlPath;
private string _downstreamUrlPathTemplate;
@ -22,7 +20,7 @@ namespace Ocelot.Benchmarks
[Setup]
public void SetUp()
{
_urlPathMatcher = new UrlPathToUrlPathTemplateMatcher();
_urlPathMatcher = new RegExUrlMatcher();
_downstreamUrlPath = "api/product/products/1/variants/?soldout=false";
_downstreamUrlPathTemplate = "api/product/products/{productId}/variants/";
}

View File

@ -10,11 +10,11 @@
"type": "platform"
},
"BenchmarkDotNet": "0.9.8",
"Ocelot.Library": "1.0.0-*"
"Ocelot": "1.0.0-*"
},
"frameworks": {
"netcoreapp1.0": {
"netcoreapp1.4": {
"imports": [
"dotnet5.6",
"portable-net45+win8"