diff --git a/build/dependencies.props b/build/dependencies.props
index bb945fe90..82ac74996 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -66,24 +66,26 @@
5.0.17
6.0.14
8.0.0-preview.1.23111.4
+
+ 8.0.0-preview.3.23177.8
-
+
2.1.3
-
+
2.2.0
-
+
3.0.0
-
+
3.1.0
-
+
6.0.14
-
- 8.0.0-preview.1.23112.2
+
+ $(MicrosoftAspNetCoreAppPackageVersion80)
diff --git a/build/nativeaot-scenarios.yml b/build/nativeaot-scenarios.yml
index 651ecbd35..9efd03fbc 100644
--- a/build/nativeaot-scenarios.yml
+++ b/build/nativeaot-scenarios.yml
@@ -40,6 +40,32 @@ parameters:
arguments: --scenario basicminimalapipublishaot $(goldilocksJobs) --property scenario=Stage1AotServerGC --property publish=nativeaot --application.packageReferences \"Microsoft.Dotnet.ILCompiler=$(MicrosoftNETCoreAppPackageVersion)\" --application.buildArguments \"/p:ServerGarbageCollection=true\"
condition: 'true'
+ - displayName: Goldilocks Stage 2 (CoreCLR)
+ arguments: --scenario todosapivanilla $(goldilocksJobs) --property scenario=Stage2 --property publish=coreclr
+ condition: 'true'
+
+ - displayName: Goldilocks Stage 2 (CoreCLR - Server GC)
+ arguments: --scenario todosapivanilla $(goldilocksJobs) --property scenario=Stage2ServerGC --property publish=coreclr --application.buildArguments \"/p:ServerGarbageCollection=true\"
+ condition: 'true'
+
+ - displayName: Goldilocks Stage 2 (CoreCLR - PGO)
+ arguments: --scenario todosapivanilla $(goldilocksJobs) --property scenario=Stage2Pgo --property publish=coreclr --application.environmentVariables DOTNET_TieredPGO=1
+ condition: Math.round(Date.now() / 43200000) % 6 == 1 # once every 6 half-days (43200000 ms per half-day)
+
+ - displayName: Goldilocks Stage 2 (CoreCLR - Trim R2R SingleFile)
+ arguments: --scenario todosapipublishtrimr2rsinglefile $(goldilocksJobs) --property scenario=Stage2TrimR2RSingleFile --property publish=coreclr
+ condition: 'true'
+
+ - displayName: Goldilocks Stage 2 (NativeAOT - Workstation GC)
+ # workaround https://github.com/dotnet/runtime/issues/81382 by explicitly referencing a Microsoft.Dotnet.ILCompiler version
+ arguments: --scenario todosapipublishaot $(goldilocksJobs) --property scenario=Stage2Aot --property publish=nativeaot --application.packageReferences \"Microsoft.Dotnet.ILCompiler=$(MicrosoftNETCoreAppPackageVersion)\"
+ condition: 'true'
+
+ - displayName: Goldilocks Stage 2 (NativeAOT - Server GC)
+ # workaround https://github.com/dotnet/runtime/issues/81382 by explicitly referencing a Microsoft.Dotnet.ILCompiler version
+ arguments: --scenario todosapipublishaot $(goldilocksJobs) --property scenario=Stage2AotServerGC --property publish=nativeaot --application.packageReferences \"Microsoft.Dotnet.ILCompiler=$(MicrosoftNETCoreAppPackageVersion)\" --application.buildArguments \"/p:ServerGarbageCollection=true\"
+ condition: 'true'
+
- displayName: Goldilocks gRPC Stage 1 (CoreCLR)
arguments: --scenario basicgrpcvanilla $(goldilocksJobs) --property scenario=Stage1Grpc --property publish=coreclr
condition: 'true'
diff --git a/scenarios/goldilocks.benchmarks.yml b/scenarios/goldilocks.benchmarks.yml
index a407980fe..55f9a16c5 100644
--- a/scenarios/goldilocks.benchmarks.yml
+++ b/scenarios/goldilocks.benchmarks.yml
@@ -21,6 +21,16 @@ jobs:
serverScheme: http
serverPort: 5000
arguments: "--urls {{serverScheme}}://{{serverAddress}}:{{serverPort}}"
+ todosapiaspnetbenchmarks:
+ source:
+ repository: https://github.com/aspnet/benchmarks.git
+ branchOrCommit: main
+ project: src/BenchmarksApps/TodosApi/TodosApi.csproj
+ readyStateText: Application started.
+ variables:
+ serverScheme: http
+ serverPort: 5000
+ arguments: "--urls {{serverScheme}}://{{serverAddress}}:{{serverPort}}"
basicgrpcaspnetbenchmarks:
source:
repository: https://github.com/aspnet/benchmarks.git
@@ -42,6 +52,16 @@ jobs:
waitForExit: false
options:
requiredOperatingSystem: linux
+ postgresql:
+ source:
+ repository: https://github.com/TechEmpower/FrameworkBenchmarks.git
+ branchOrCommit: master
+ dockerFile: toolset/databases/postgres/postgres.dockerfile
+ dockerImageName: postgres_te
+ dockerContextDirectory: toolset/databases/postgres
+ readyStateText: ready to accept connections
+ noClean: true
+
scenarios:
@@ -82,6 +102,58 @@ scenarios:
presetHeaders: json
path: /todos
+ todosapipublishaot:
+ db:
+ job: postgresql
+ application:
+ job: todosapiaspnetbenchmarks
+ buildArguments:
+ - "/p:PublishAot=true"
+ - "/p:StripSymbols=true"
+ environmentVariables:
+ CONNECTIONSTRINGS__TODODB: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4
+ load:
+ job: wrk
+ variables:
+ presetHeaders: json
+ path: /api/todos
+
+ todosapipublishtrimr2rsinglefile:
+ db:
+ job: postgresql
+ application:
+ job: todosapiaspnetbenchmarks
+ buildArguments:
+ - "/p:PublishAot=false"
+ - "/p:PublishTrimmed=true"
+ - "/p:PublishReadyToRun=true"
+ - "/p:PublishSingleFile=true"
+ - "/p:TrimMode=full"
+ - "/p:EnableRequestDelegateGenerator=true"
+ environmentVariables:
+ CONNECTIONSTRINGS__TODODB: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4
+ load:
+ job: wrk
+ variables:
+ presetHeaders: json
+ path: /api/todos
+
+ todosapivanilla:
+ db:
+ job: postgresql
+ application:
+ job: todosapiaspnetbenchmarks
+ buildArguments:
+ - "/p:PublishAot=false"
+ - "/p:EnableRequestDelegateGenerator=false"
+ environmentVariables:
+ CONNECTIONSTRINGS__TODODB: Server={{databaseServer}};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4
+ load:
+ job: wrk
+ variables:
+ presetHeaders: json
+ path: /api/todos
+
basicgrpcpublishaot:
application:
job: basicgrpcaspnetbenchmarks
diff --git a/src/BenchmarksApps.sln b/src/BenchmarksApps.sln
index 19fdde424..d3cb0961f 100644
--- a/src/BenchmarksApps.sln
+++ b/src/BenchmarksApps.sln
@@ -34,9 +34,6 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatformBenchmarks", "BenchmarksApps\TechEmpower\PlatformBenchmarks\PlatformBenchmarks.csproj", "{ACA43671-AD28-4F72-AAAB-6C32B388C2F0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{689C58F6-8DF0-4565-887F-C9A9BDA757D8}"
- ProjectSection(SolutionItems) = preProject
- BenchmarksApps\Directory.Build.props = BenchmarksApps\Directory.Build.props
- EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildPerformance", "BenchmarksApps\BuildPerformance\BuildPerformance.csproj", "{2E953AFB-4900-4B5D-9E78-819E950CD365}"
EndProject
@@ -52,6 +49,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TcpEcho", "BenchmarksApps\T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorUnited", "BenchmarksApps\TechEmpower\BlazorUnited\BlazorUnited.csproj", "{FE3606FF-CBC9-421A-A0B5-836E312E7719}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodosApi", "BenchmarksApps\TodosApi\TodosApi.csproj", "{8E1A1F61-43E4-4629-A25B-7E5FA82697D0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_Database|Any CPU = Debug_Database|Any CPU
@@ -196,6 +195,14 @@ Global
{FE3606FF-CBC9-421A-A0B5-836E312E7719}.Release_Database|Any CPU.Build.0 = Release_Database|Any CPU
{FE3606FF-CBC9-421A-A0B5-836E312E7719}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE3606FF-CBC9-421A-A0B5-836E312E7719}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Debug_Database|Any CPU.ActiveCfg = Debug_Database|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Debug_Database|Any CPU.Build.0 = Debug_Database|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Release_Database|Any CPU.ActiveCfg = Release_Database|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Release_Database|Any CPU.Build.0 = Release_Database|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E1A1F61-43E4-4629-A25B-7E5FA82697D0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/BenchmarksApps/Directory.Build.props b/src/BenchmarksApps/Directory.Build.props
deleted file mode 100644
index 4ed01906f..000000000
--- a/src/BenchmarksApps/Directory.Build.props
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- Debug;Release;Debug_Database;Release_Database
- true
-
-
diff --git a/src/BenchmarksApps/DistributedCache/DistributedCache.csproj b/src/BenchmarksApps/DistributedCache/DistributedCache.csproj
index 75e95981e..f8bd62c83 100644
--- a/src/BenchmarksApps/DistributedCache/DistributedCache.csproj
+++ b/src/BenchmarksApps/DistributedCache/DistributedCache.csproj
@@ -1,10 +1,13 @@
- net7.0
+ net7.0
Exe
enable
enable
- $(TargetFramework.Substring(3,3)).*
+
+
+ $(TargetFramework.Substring(3,3)).*
+ $(TargetFramework.Substring(3,3)).*
diff --git a/src/BenchmarksApps/Mvc/Mvc.csproj b/src/BenchmarksApps/Mvc/Mvc.csproj
index 435996f36..aae1589d7 100644
--- a/src/BenchmarksApps/Mvc/Mvc.csproj
+++ b/src/BenchmarksApps/Mvc/Mvc.csproj
@@ -2,6 +2,10 @@
net7.0
+
+
+ $(TargetFramework.Substring(3,3)).*
+ $(TargetFramework.Substring(3,3)).*
diff --git a/src/BenchmarksApps/SignalR/BenchmarkServer.csproj b/src/BenchmarksApps/SignalR/BenchmarkServer.csproj
index 60beb1ef5..dfd3436d4 100644
--- a/src/BenchmarksApps/SignalR/BenchmarkServer.csproj
+++ b/src/BenchmarksApps/SignalR/BenchmarkServer.csproj
@@ -2,6 +2,10 @@
net7.0
+
+
+ $(TargetFramework.Substring(3,3)).*
+ $(TargetFramework.Substring(3,3)).*
diff --git a/src/BenchmarksApps/StaticFiles/StaticFiles.csproj b/src/BenchmarksApps/StaticFiles/StaticFiles.csproj
index 3e645b221..a7163ba1a 100644
--- a/src/BenchmarksApps/StaticFiles/StaticFiles.csproj
+++ b/src/BenchmarksApps/StaticFiles/StaticFiles.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1;net5.0
+ net6.0;net7.0;net8.0
diff --git a/src/BenchmarksApps/TodosApi/DataExtensions.cs b/src/BenchmarksApps/TodosApi/DataExtensions.cs
new file mode 100644
index 000000000..2cfaf6115
--- /dev/null
+++ b/src/BenchmarksApps/TodosApi/DataExtensions.cs
@@ -0,0 +1,207 @@
+using System.Data;
+using System.Runtime.CompilerServices;
+
+namespace Npgsql;
+
+internal static class DataExtensions
+{
+ public static async Task ExecuteAsync(this NpgsqlDataSource dataSource, string commandText, CancellationToken cancellationToken = default)
+ {
+ await using var cmd = dataSource.CreateCommand(commandText);
+
+ return await cmd.ExecuteNonQueryAsync(cancellationToken);
+ }
+
+ public static async Task