Browse Source

.NET Core: add back rhtx scenarios (#5054)

Now that rhtx supports .NET Core 3.0, re-enable these benchmarks.
Tom Deseyn 6 years ago
parent
commit
9ec8e72f42

+ 8 - 18
frameworks/CSharp/aspnetcore-corert/PlatformBenchmarks/BenchmarkConfigurationHelpers.cs

@@ -6,6 +6,7 @@ using System.Net;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.Configuration;
+using System.IO.Pipelines;
 
 
 namespace PlatformBenchmarks
 namespace PlatformBenchmarks
 {
 {
@@ -38,24 +39,13 @@ namespace PlatformBenchmarks
                     }
                     }
                 });
                 });
             }
             }
-            // else if (string.Equals(webHost, "LinuxTransport", StringComparison.OrdinalIgnoreCase))
-            // {
-            //     builder.ConfigureServices(services =>
-            //     {
-            //         services.Configure<KestrelServerOptions>(options =>
-            //         {
-            //             // Run callbacks on the transport thread
-            //             options.ApplicationSchedulingMode = SchedulingMode.Inline;
-            //         });
-            //     })
-            //     .UseLinuxTransport(options =>
-            //     {
-            //         if (theadCount.HasValue)
-            //         {
-            //             options.ThreadCount = theadCount.Value;
-            //         }
-            //     });
-            // }
+            else if (string.Equals(webHost, "LinuxTransport", StringComparison.OrdinalIgnoreCase))
+            {
+                builder.UseLinuxTransport(options =>
+                {
+                    options.ApplicationSchedulingMode = PipeScheduler.Inline;
+                });
+            }
 
 
             return builder;
             return builder;
         }
         }

+ 1 - 1
frameworks/CSharp/aspnetcore-corert/PlatformBenchmarks/PlatformBenchmarks.csproj

@@ -25,7 +25,7 @@
     <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Options" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Options" Version="3.0.0-preview7.19362.4" />
-    <!--PackageReference Include="RedHat.AspNetCore.Server.Kestrel.Transport.Linux" Version="2.2.0-*" /-->
+    <PackageReference Include="RedHat.AspNetCore.Server.Kestrel.Transport.Linux" Version="3.0.0-*" />
     <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="1.0.0-alpha-*" />
     <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="1.0.0-alpha-*" />
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 2 - 2
frameworks/CSharp/aspnetcore-corert/PlatformBenchmarks/rd.xml

@@ -39,8 +39,8 @@
         <Assembly Name="Microsoft.Extensions.Configuration.Json">
         <Assembly Name="Microsoft.Extensions.Configuration.Json">
             <Type Name="Microsoft.Extensions.Configuration.Json.JsonConfigurationSource" Dynamic="Required All" />
             <Type Name="Microsoft.Extensions.Configuration.Json.JsonConfigurationSource" Dynamic="Required All" />
         </Assembly>
         </Assembly>
-        <!--Assembly Name="RedHat.AspNetCore.Server.Kestrel.Transport.Linux">
+        <Assembly Name="RedHat.AspNetCore.Server.Kestrel.Transport.Linux">
             <Type Name="RedHat.AspNetCore.Server.Kestrel.Transport.Linux.LinuxTransportFactory" Dynamic="Required All" />
             <Type Name="RedHat.AspNetCore.Server.Kestrel.Transport.Linux.LinuxTransportFactory" Dynamic="Required All" />
-        </Assembly-->
+        </Assembly>
     </Application>
     </Application>
 </Directives>
 </Directives>

+ 5 - 2
frameworks/CSharp/aspnetcore-corert/aspcore-corert-rhtx.dockerfile

@@ -3,11 +3,14 @@ RUN echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | tee
 RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
 RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
 RUN apt-get update
 RUN apt-get update
 RUN apt-get -yqq install cmake clang-3.9 libicu57 libunwind8 uuid-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev
 RUN apt-get -yqq install cmake clang-3.9 libicu57 libunwind8 uuid-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev
+RUN wget https://download.visualstudio.microsoft.com/download/pr/a0e368ac-7161-4bde-a139-1a3ef5a82bbe/439cdbb58950916d3718771c5d986c35/dotnet-sdk-3.0.100-preview8-013656-linux-x64.tar.gz
+RUN mkdir -p /dotnet
+RUN tar zxf dotnet-sdk-3.0.100-preview8-013656-linux-x64.tar.gz -C /dotnet
 WORKDIR /app
 WORKDIR /app
 COPY PlatformBenchmarks .
 COPY PlatformBenchmarks .
-RUN dotnet publish -c Release -o out -r linux-x64
+RUN /dotnet/dotnet publish -c Release -o out -r linux-x64
 
 
-FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime
+FROM mcr.microsoft.com/dotnet/core/aspnet:3.0 AS runtime
 WORKDIR /app
 WORKDIR /app
 COPY --from=build /app/out ./
 COPY --from=build /app/out ./
 
 

+ 19 - 0
frameworks/CSharp/aspnetcore-corert/benchmark_config.json

@@ -19,6 +19,25 @@
       "display_name": "ASP.NET Core",
       "display_name": "ASP.NET Core",
       "notes": "",
       "notes": "",
       "versus": "aspcore"
       "versus": "aspcore"
+    },
+    "rhtx": {
+      "plaintext_url": "/plaintext",
+      "json_url": "/json",
+      "port": 8080,
+      "approach": "Stripped",
+      "classification": "Platform",
+      "database": "None",
+      "framework": "ASP.NET Core",
+      "language": "C#",
+      "orm": "Raw",
+      "platform": ".NET",
+      "flavor": "CoreRT",
+      "webserver": "Kestrel",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "ASP.NET Core, Red Hat Linux Transport",
+      "notes": "",
+      "versus": "aspcore"
     }
     }
   }]
   }]
 }
 }

+ 8 - 18
frameworks/CSharp/aspnetcore/PlatformBenchmarks/BenchmarkConfigurationHelpers.cs

@@ -6,6 +6,7 @@ using System.Net;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.Configuration;
+using System.IO.Pipelines;
 
 
 namespace PlatformBenchmarks
 namespace PlatformBenchmarks
 {
 {
@@ -38,24 +39,13 @@ namespace PlatformBenchmarks
                     }
                     }
                 });
                 });
             }
             }
-            // else if (string.Equals(webHost, "LinuxTransport", StringComparison.OrdinalIgnoreCase))
-            // {
-            //     builder.ConfigureServices(services =>
-            //     {
-            //         services.Configure<KestrelServerOptions>(options =>
-            //         {
-            //             // Run callbacks on the transport thread
-            //             options.ApplicationSchedulingMode = SchedulingMode.Inline;
-            //         });
-            //     })
-            //     .UseLinuxTransport(options =>
-            //     {
-            //         if (theadCount.HasValue)
-            //         {
-            //             options.ThreadCount = theadCount.Value;
-            //         }
-            //     });
-            // }
+            else if (string.Equals(webHost, "LinuxTransport", StringComparison.OrdinalIgnoreCase))
+            {
+                builder.UseLinuxTransport(options =>
+                {
+                    options.ApplicationSchedulingMode = PipeScheduler.Inline;
+                });
+            }
 
 
             return builder;
             return builder;
         }
         }

+ 1 - 1
frameworks/CSharp/aspnetcore/PlatformBenchmarks/PlatformBenchmarks.csproj

@@ -14,7 +14,7 @@
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="Npgsql" Version="4.0.8" />
     <PackageReference Include="Npgsql" Version="4.0.8" />
     <PackageReference Include="MySqlConnector" Version="0.56.0" />
     <PackageReference Include="MySqlConnector" Version="0.56.0" />
-    <!-- <PackageReference Include="RedHat.AspNetCore.Server.Kestrel.Transport.Linux" Version="3.0.0-*" /> -->
+    <PackageReference Include="RedHat.AspNetCore.Server.Kestrel.Transport.Linux" Version="3.0.0-*" />
 
 
     <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview7.19362.4" />
     <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0-preview7.19362.4" />

+ 57 - 0
frameworks/CSharp/aspnetcore/benchmark_config.json

@@ -20,6 +20,25 @@
       "notes": "",
       "notes": "",
       "versus": "aspcore"
       "versus": "aspcore"
     },
     },
+    "rhtx": {
+      "plaintext_url": "/plaintext",
+      "json_url": "/json",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "None",
+      "framework": "ASP.NET Core",
+      "language": "C#",
+      "orm": "Raw",
+      "platform": ".NET",
+      "flavor": "CoreCLR",
+      "webserver": "Kestrel",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "ASP.NET Core, Red Hat Linux Transport",
+      "notes": "",
+      "versus": "aspcore"
+    },
     "ado-pg": {
     "ado-pg": {
       "fortune_url": "/fortunes",
       "fortune_url": "/fortunes",
       "db_url": "/db",
       "db_url": "/db",
@@ -58,6 +77,44 @@
       "notes": "",
       "notes": "",
       "versus": "aspcore-ado-pg-up"
       "versus": "aspcore-ado-pg-up"
     },
     },
+    "rhtx-pg": {
+      "fortune_url": "/fortunes",
+      "db_url": "/db",
+      "query_url": "/queries/queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "Postgres",
+      "framework": "ASP.NET Core",
+      "language": "C#",
+      "orm": "Raw",
+      "platform": ".NET",
+      "flavor": "CoreCLR",
+      "webserver": "Kestrel",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "ASP.NET Core, Red Hat Linux Transport, ADO.NET",
+      "notes": "",
+      "versus": "aspcore-ado-pg"
+    },
+    "rhtx-pg-up": {
+      "update_url": "/updates/queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "Postgres",
+      "framework": "ASP.NET Core",
+      "language": "C#",
+      "orm": "Raw",
+      "platform": ".NET",
+      "flavor": "CoreCLR",
+      "webserver": "Kestrel",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "ASP.NET Core, Red Hat Linux Transport, ADO.NET",
+      "notes": "",
+      "versus": "aspcore-ado-pg-up"
+    },
     "ado-my": {
     "ado-my": {
       "fortune_url": "/fortunes",
       "fortune_url": "/fortunes",
       "db_url": "/db",
       "db_url": "/db",