Просмотр исходного кода

Add Ix-benchmarks project configurations for current sources, Ix 3.1.1 and Ix 3.2 (which currently points to 3.2.0-preview.635).

Daniel Weber 7 лет назад
Родитель
Сommit
dfb3aca770

+ 22 - 1
Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj

@@ -3,13 +3,34 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <LangVersion>latest</LangVersion>
+    <Optimize>true</Optimize>
+    <Configurations>Current Sources;Ix.net 3.1.1;Ix.net 3.2</Configurations>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Ix.net 3.1.1|AnyCPU'">
+    <DefineConstants>$(DefineConstants);IX3_1_1</DefineConstants>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Ix.net 3.2|AnyCPU'">
+    <DefineConstants>$(DefineConstants);IX3_2</DefineConstants>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Current Sources|AnyCPU'">
+    <DefineConstants>$(DefineConstants);CURRENT</DefineConstants>
   </PropertyGroup>
 
   <ItemGroup>
     <PackageReference Include="BenchmarkDotNet" Version="0.10.14" />
   </ItemGroup>
 
+  <ItemGroup Condition="'$(Configuration)|$(Platform)'=='Ix.net 3.1.1|AnyCPU'">
+    <PackageReference Include="System.Interactive" Version="3.1.1" />
+  </ItemGroup>
+
+  <ItemGroup Condition="'$(Configuration)|$(Platform)'=='Ix.net 3.2|AnyCPU'">
+    <PackageReference Include="System.Interactive" Version="3.2.0-preview.635" />
+  </ItemGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\System.Interactive.Tests\System.Interactive.Tests.csproj" />
   </ItemGroup>

+ 2 - 0
Ix.NET/Source/Benchmarks.System.Interactive/Program.cs

@@ -14,6 +14,8 @@ namespace Benchmarks.System.Interactive
         {
             Console.WriteLine("Effective Ix-version: " + typeof(EnumerableEx).Assembly.GetName().Version);
 
+            //Available compiler directives: IX3_1_1, IX3_2, CURRENT.
+
             var switcher = new BenchmarkSwitcher(new[] {
                 typeof(BufferCountBenchmark),
             });

+ 5 - 5
Ix.NET/Source/Ix.NET.sln

@@ -37,7 +37,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive", "refs\
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive.Providers", "refs\System.Interactive.Providers\System.Interactive.Providers.csproj", "{5DF341BE-B369-4250-AFD4-604DE8C95E45}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks.System.Interactive", "Benchmarks.System.Interactive\Benchmarks.System.Interactive.csproj", "{3285529A-8227-4D40-B524-1A1F919F0E7B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks.System.Interactive", "Benchmarks.System.Interactive\Benchmarks.System.Interactive.csproj", "{3285529A-8227-4D40-B524-1A1F919F0E7B}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -77,10 +77,10 @@ Global
 		{5DF341BE-B369-4250-AFD4-604DE8C95E45}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{5DF341BE-B369-4250-AFD4-604DE8C95E45}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5DF341BE-B369-4250-AFD4-604DE8C95E45}.Release|Any CPU.Build.0 = Release|Any CPU
-		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Debug|Any CPU.ActiveCfg = Current Sources|Any CPU
+		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Debug|Any CPU.Build.0 = Current Sources|Any CPU
+		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Release|Any CPU.ActiveCfg = Current Sources|Any CPU
+		{3285529A-8227-4D40-B524-1A1F919F0E7B}.Release|Any CPU.Build.0 = Current Sources|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE