Introduce Datadog.Trace.Build.g.sln to reduce size of artifacts copied between stages#8610
Conversation
BenchmarksBenchmark execution time: 2026-05-12 15:22:25 Comparing candidate commit 8b05a4a in PR branch Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥 Scenarios present only in baseline:
Found 3 performance improvements and 3 performance regressions! Performance is the same for 48 metrics, 18 unstable metrics, 89 known flaky benchmarks, 37 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8610) 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 (8610) - mean (73ms) : 70, 75
master - mean (75ms) : 71, 79
section Bailout
This PR (8610) - mean (79ms) : 75, 82
master - mean (79ms) : 75, 82
section CallTarget+Inlining+NGEN
This PR (8610) - mean (1,107ms) : 1039, 1174
master - mean (1,102ms) : 1049, 1156
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 (8610) - mean (116ms) : 110, 122
master - mean (117ms) : 111, 124
section Bailout
This PR (8610) - mean (118ms) : 113, 122
master - mean (115ms) : 112, 118
section CallTarget+Inlining+NGEN
This PR (8610) - mean (788ms) : 758, 818
master - mean (795ms) : 767, 822
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8610) - mean (103ms) : 98, 108
master - mean (106ms) : 101, 111
section Bailout
This PR (8610) - mean (105ms) : 100, 110
master - mean (104ms) : 99, 108
section CallTarget+Inlining+NGEN
This PR (8610) - mean (945ms) : 909, 982
master - mean (946ms) : 911, 981
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8610) - mean (100ms) : 96, 104
master - mean (103ms) : 97, 110
section Bailout
This PR (8610) - mean (104ms) : 99, 110
master - mean (105ms) : 99, 110
section CallTarget+Inlining+NGEN
This PR (8610) - mean (827ms) : 784, 871
master - mean (827ms) : 783, 871
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 (8610) - mean (193ms) : 188, 197
master - mean (191ms) : 187, 195
section Bailout
This PR (8610) - mean (195ms) : 191, 199
master - mean (194ms) : 192, 196
section CallTarget+Inlining+NGEN
This PR (8610) - mean (1,163ms) : 1119, 1207
master - mean (1,167ms) : 1118, 1215
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 (8610) - mean (272ms) : 268, 276
master - mean (272ms) : 268, 277
section Bailout
This PR (8610) - mean (273ms) : 269, 276
master - mean (273ms) : 270, 275
section CallTarget+Inlining+NGEN
This PR (8610) - mean (929ms) : 912, 945
master - mean (935ms) : 909, 960
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8610) - mean (266ms) : 263, 270
master - mean (266ms) : 262, 270
section Bailout
This PR (8610) - mean (266ms) : 264, 269
master - mean (266ms) : 264, 269
section CallTarget+Inlining+NGEN
This PR (8610) - mean (1,125ms) : 1062, 1187
master - mean (1,124ms) : 1068, 1179
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8610) - mean (264ms) : 259, 269
master - mean (264ms) : 259, 268
section Bailout
This PR (8610) - mean (264ms) : 261, 267
master - mean (264ms) : 261, 266
section CallTarget+Inlining+NGEN
This PR (8610) - mean (1,018ms) : 977, 1060
master - mean (1,011ms) : 960, 1062
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Summary of changes Set `UseArtifactsOutput` for all `tracer/` libraries ## Reason for change `UseArtifactsOutput` puts all the build output [nested in a top-level directory](https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output). We are already using this for samples and in _some_ places. This PR extends it to use in more of the tracer build. ``` 📁 artifacts └──📂 <Type of output> └──📂 <Project name> └──📂 <Pivot> ``` The advantage of this approach is it neatly scopes the output of a stage in the `artifacts/bin`, `artifacts/obj` or `artifacts/packages` folder (for example). This is convenient in _general_ (I use artifact layout in personal projects wherever possible), but it's particularly useful in CI, especially if/when we need to migrate the build to gitlab. ## Implementation details Get the 🤖 to make the change. As long as CI keeps working, we can still build locally, and the artifacts look the same, ultimately, we're good 👍 ## Test coverage This is the test. Also had the agent do some analysis of the artifacts to make sure it's ok, and tested locally. ## Other details Stacked on: - #8610 Will add more to the stack (e.g. profiling assets later) Requires: - DataDog/serverless-tools#126
## Summary of changes Follows on from #8636, moves more build outputs into the artifacts folder ## Reason for change Today, build outputs end up scattered throughput the repository, because of how the defaults work for .NET, and how we're using a very "bespoke" way of building (i.e. we're not just doing `dotnet build`). That makes it tricky to track where things are built to in CI particularly, and will hamper any attempts to modify CI (e.g. to move to GitLab). ## Implementation details Had 🤖 look for everything that wasn't going to the `artifacts/` folder, and move it, so that we can more easily include/exclude it from artifacts. Took a _relatively_ conservative approach in places (e.g. to the profiler assets) Final results look like this: ``` artifacts/ ├─📂 bin/ ├─📂 obj/ ├─📂 publish/ ├─📂 package/ ├─📂 build_data/ ├─📂 monitoring-home/ ├─📂 native-bin/ ├─📂 native-obj/ ├─📂 native-symbols/ ├─📂 ProfilerResources/ ├─📂 profiler-build/ ├─📂 output/ ├─📂 deps/ └─📂 vcpkg/ ``` The important thing is that we can exclude most of these when doing the "upload working directory" step ## Test coverage This is the test - if the build still passes I think we're ok. ## Other details Stacked on - #8610 - #8636 --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
## Summary of changes Update all the launchsettings.json to point to the new output path in #8680 ## Reason for change We moved the default output folder in #8680, but there were already enough changes in that PR, so I didn't want to clutter it up with these simple changes. ## Implementation details 🤖 converted `shared\bin` to `artifacts` ## Test coverage N/A - it's only for local testing (personally I would probably remove all of these files completely, but some people like them) ## Other details Stacked on - #8610 - #8636 - #8680 --------- Co-authored-by: Claude Opus 4.7 <[email protected]>
Summary of changes
.artifactignoreto prevent uploading.csfiles etc which we don't needDatadog.Trace.Build.g.sln(counterpoint ofDatadog.Trace.Samples.g.sln)Reason for change
In CI, we currently build the sample applications in a separate distinct stage. However, as our
Datadog.Trace.slnreferences all the samples, the "restore" step in the "standard" build restores all the packages for all the samples.What's worse, is that we then end up copying these packages between all the subsequent stages (unit tests, integration tests etc). That significantly increases the size of the artifacts, and they aren't actually needed.
Additionally, because we upload the whole working directory, we're also uploading all the repo files like .cs and .md files. We filter these out when we do the download, so this is just wasted space and time going into the upload.
Implementation details
This is an AI assisted revisit of work I tried a long time ago - turns out we'd already done most of the leg work to make this simpler.
Test coverage
I did a "full" build (all products) here - as long as that looks to be working, and there's no obvious "zero-length" stages or anything similar, then we should be good 🤞
Other details
I think there's various follow up steps as well , e.g. to stop needing the obj folder at all, or to use artifact layout everywhere, (all as precursors to potentially migrating to GitLab FWIW 🙈)