Move microbench AMI provision file into this repo, stop cloning benchmarking-platform#8458
Conversation
…robenchmarks, clone main instead
Move the AMI provision file from the dd-trace-dotnet/micro branch of the benchmarking-platform repo into .gitlab/benchmarks/microbenchmarks/infrastructure/ami.yml, alongside the existing instance.yml. Update the AMI build job to reference the local file directly instead of cloning the external branch.
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8458) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (73ms) : 70, 76
master - mean (73ms) : 70, 75
section Bailout
This PR (8458) - mean (77ms) : 74, 80
master - mean (79ms) : 75, 82
section CallTarget+Inlining+NGEN
This PR (8458) - mean (1,079ms) : 1035, 1123
master - mean (1,073ms) : 1025, 1120
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (113ms) : 109, 117
master - mean (113ms) : 108, 119
section Bailout
This PR (8458) - mean (114ms) : 111, 117
master - mean (115ms) : 110, 121
section CallTarget+Inlining+NGEN
This PR (8458) - mean (795ms) : 767, 824
master - mean (785ms) : 763, 806
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (102ms) : 97, 107
master - mean (101ms) : 97, 105
section Bailout
This PR (8458) - mean (100ms) : 98, 103
master - mean (100ms) : 97, 102
section CallTarget+Inlining+NGEN
This PR (8458) - mean (938ms) : 907, 969
master - mean (939ms) : 899, 978
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (100ms) : 97, 103
master - mean (99ms) : 96, 102
section Bailout
This PR (8458) - mean (104ms) : 100, 108
master - mean (103ms) : 98, 108
section CallTarget+Inlining+NGEN
This PR (8458) - mean (823ms) : 785, 861
master - mean (819ms) : 789, 849
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (201ms) : 197, 206
master - mean (202ms) : 197, 207
section Bailout
This PR (8458) - mean (205ms) : 200, 209
master - mean (206ms) : 201, 211
section CallTarget+Inlining+NGEN
This PR (8458) - mean (1,190ms) : 1123, 1256
master - mean (1,193ms) : 1155, 1232
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (292ms) : 284, 299
master - mean (293ms) : 285, 301
section Bailout
This PR (8458) - mean (292ms) : 286, 297
master - mean (294ms) : 289, 299
section CallTarget+Inlining+NGEN
This PR (8458) - mean (968ms) : 937, 999
master - mean (975ms) : 946, 1003
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (284ms) : 277, 290
master - mean (287ms) : 279, 296
section Bailout
This PR (8458) - mean (284ms) : 278, 291
master - mean (287ms) : 279, 294
section CallTarget+Inlining+NGEN
This PR (8458) - mean (1,157ms) : 1116, 1198
master - mean (1,160ms) : 1123, 1197
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8458) - mean (282ms) : 275, 288
master - mean (285ms) : 279, 291
section Bailout
This PR (8458) - mean (283ms) : 278, 288
master - mean (285ms) : 280, 290
section CallTarget+Inlining+NGEN
This PR (8458) - mean (1,040ms) : 991, 1090
master - mean (1,049ms) : 1009, 1089
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-04-16 09:25:01 Comparing candidate commit 34f8662 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 26 metrics, 0 unstable metrics, 87 known flaky benchmarks.
|
andrewlock
left a comment
There was a problem hiding this comment.
I think we could/should improve the sdk install part if possible!
| # These versions are chosen to align with the dd-trace-dotnet repository's supported SDK versions: https://github.com/DataDog/dd-trace-dotnet/blob/a4a4ce0822735b3c8cf6862bcabce81fc0959753/tracer/build/_build/Build.cs#L598-L602 | ||
|
|
||
| # It includes the final End-of-Life (EOL) versions for .NET Core 3.1 and .NET 6.0 along with the latest .NET version. | ||
| DOTNET_SDK_VERSIONS: "6.0.428,3.1.426,10.0.100" |
There was a problem hiding this comment.
FYI, this isn't quite true - the versions listed in there are the runtime versions that we specifically target, but we run on any runtime compatible with these versions. + it's nothing to do with "SDK" 😄
What we Really need is:
- One DOTNET_SDK_VERSION (whatever is listed in global.json, so would be better to parse it from there directly to reduce duplication)
- Whatever runtime versions we specifically run against in the Nuke target, which is
net472 netcoreapp3.1 net6.0(obvs ignore the net472 in this case).
So I think we should change this variable to be "runtimes"
| # These versions are chosen to align with the dd-trace-dotnet repository's supported SDK versions: https://github.com/DataDog/dd-trace-dotnet/blob/a4a4ce0822735b3c8cf6862bcabce81fc0959753/tracer/build/_build/Build.cs#L598-L602 | |
| # It includes the final End-of-Life (EOL) versions for .NET Core 3.1 and .NET 6.0 along with the latest .NET version. | |
| DOTNET_SDK_VERSIONS: "6.0.428,3.1.426,10.0.100" | |
| # These versions are chosen to align with the versions used in the RunBenchmarks Nuke target | |
| DOTNET_RUNTIME_VERSIONS: "6.0.428,3.1.426" |
| if (-not $env:DOTNET_SDK_VERSIONS) { | ||
| Write-Error "DOTNET_SDK_VERSIONS is not set." | ||
| exit 1 | ||
| } |
There was a problem hiding this comment.
| if (-not $env:DOTNET_SDK_VERSIONS) { | |
| Write-Error "DOTNET_SDK_VERSIONS is not set." | |
| exit 1 | |
| } | |
| if (-not $env:DOTNET_RUNTIME_VERSIONS) { | |
| Write-Error "DOTNET_RUNTIME_VERSIONS is not set." | |
| exit 1 | |
| } |
| $installDir = "C:\dotnet" | ||
| $scriptUrl = "https://dot.net/v1/dotnet-install.ps1" | ||
|
|
||
| $versions = $env:DOTNET_SDK_VERSIONS.Split(',') |
There was a problem hiding this comment.
| $versions = $env:DOTNET_SDK_VERSIONS.Split(',') | |
| $versions = $env:DOTNET_RUNTIME_VERSIONS.Split(',') |
| $versions = $env:DOTNET_SDK_VERSIONS.Split(',') | ||
| foreach ($version in $versions) { | ||
| try { | ||
| Write-Output "Installing .NET SDK $version..." |
There was a problem hiding this comment.
| Write-Output "Installing .NET SDK $version..." | |
| Write-Output "Installing .NET Runtime $version..." |
| foreach ($version in $versions) { | ||
| try { | ||
| Write-Output "Installing .NET SDK $version..." | ||
| &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version $version -InstallDir $installDir; |
There was a problem hiding this comment.
We don't need the whole SDK for these, just the runtime
| &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version $version -InstallDir $installDir; | |
| &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version $version -Runtime aspnetcore -InstallDir $installDir; |
| Write-Output "Installing .NET SDK $version..." | ||
| &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version $version -InstallDir $installDir; | ||
| } catch { | ||
| Write-Output "Failed to install .NET SDK $version. Continuing with other installations..." |
There was a problem hiding this comment.
| Write-Output "Failed to install .NET SDK $version. Continuing with other installations..." | |
| Write-Output "Failed to install .NET Runtime $version. Continuing with other installations..." |
| } | ||
|
|
||
| $installDir = "C:\dotnet" | ||
| $scriptUrl = "https://dot.net/v1/dotnet-install.ps1" |
There was a problem hiding this comment.
Install the SDK using the global.json file
| $scriptUrl = "https://dot.net/v1/dotnet-install.ps1" | |
| $scriptUrl = "https://dot.net/v1/dotnet-install.ps1" | |
| $globalJsonPath = "I/Don't/Know/How/To/Get/This/😅" | |
| try { | |
| Write-Output "Installing .NET SDK..." | |
| &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version $version -InstallDir $installDir -JSonFile "$globalJsonPath"; | |
| } catch { | |
| Write-Output "Failed to install .NET SDK $version. Continuing with other installations..." | |
| } |
Summary of changes
ephemeral-infra/ami.yamlfrom thedd-trace-dotnet/microbranch of thebenchmarking-platformrepo into.gitlab/benchmarks/microbenchmarks/infrastructure/ami.yml, alongside the existinginstance.ymlbuild-dd-trace-dotnet-microbenchmarks-amijob to reference the local file directly viaPROVISION_FILE, removing the need to clone the external branchReason for change
The
dd-trace-dotnet/microbranch inbenchmarking-platformis being removed. The AMI provision file is now co-located with the rest of the microbenchmark infrastructure config in this repo.Implementation details
The
run-benchmarksjob already referencesinstance.ymlvia a local path. The AMI build job now follows the same pattern forami.yml.Test coverage
AMI build with the current setup: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-dotnet/-/jobs/1600227613
Other details
None.