Skip to content

Set .Net-specific injection package size ratchet#8392

Closed
lloeki wants to merge 1 commit intomasterfrom
lloeki/injection-size-ratchet
Closed

Set .Net-specific injection package size ratchet#8392
lloeki wants to merge 1 commit intomasterfrom
lloeki/injection-size-ratchet

Conversation

@lloeki
Copy link
Copy Markdown
Member

@lloeki lloeki commented Apr 1, 2026

Summary of changes

Introduce language-specific thresholds for the ratchet.

Reason for change

Due to a change PHP-side libdatadog was bumped to v29. This version bump caused PHP images to blow past their previous limit.

Simultaneously, changes to the datadog-package binary were picked up. Notably the github.com/klauspost/compress/zstd dependency was bumped from 1.17.4 to 1.18.1. This bump included in 1.17.5 a default value change for the compression context size, downscaled from 32MB to 8MB (fixing compatibility with browsers like Chrome), causing drastic changes in compression results.

Unbeknownst to the second change, PHP therefore updated the global limits, attributing the size change to the libdatadog bump (which was true, but not for the whole of it):

This allowed a change to slip through to other languages, where the new datadog-package binary caused regressions in package size without change to the inputs. Due to the wildly differing sizes of packages across languages the regression is silent, rendering the size threshold ratchet moot.

To combat such silently creeping regressions, this PR introduces language-specific thresholds for the ratchet.

Implementation details

Overrides variables in one pipeline

Test coverage

Other details

datadog-package was fixed in https://github.com/DataDog/datadog-packages/pull/64 which may take some time to trickle down.

@lloeki lloeki requested a review from a team as a code owner April 1, 2026 13:07
@github-actions github-actions bot added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Apr 1, 2026
@andrewlock
Copy link
Copy Markdown
Member

Thanks, but I set it here already 😄 #8382

@lloeki
Copy link
Copy Markdown
Member Author

lloeki commented Apr 1, 2026

Oh lovely! I missed the ping 🤦 AND the code in my worktree 🤦 🤦

Sorry for the noise, closing right now.

@lloeki lloeki closed this Apr 1, 2026
@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8392) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration71.74 ± (71.74 - 72.01) ms75.75 ± (75.70 - 76.03) ms+5.6%✅⬆️
.NET Framework 4.8 - Bailout
duration75.99 ± (75.84 - 76.12) ms79.98 ± (79.85 - 80.22) ms+5.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1053.52 ± (1054.87 - 1059.11) ms1094.89 ± (1095.65 - 1101.33) ms+3.9%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.51 ± (22.47 - 22.55) ms23.26 ± (23.19 - 23.32) ms+3.3%✅⬆️
process.time_to_main_ms84.25 ± (84.05 - 84.44) ms88.50 ± (88.28 - 88.72) ms+5.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.90 - 10.91) MB10.90 ± (10.90 - 10.90) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.21 ± (22.17 - 22.24) ms23.17 ± (23.11 - 23.23) ms+4.3%✅⬆️
process.time_to_main_ms84.65 ± (84.43 - 84.87) ms89.85 ± (89.64 - 90.06) ms+6.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.94 ± (10.93 - 10.94) MB-0.1%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms223.79 ± (222.49 - 225.08) ms233.60 ± (232.63 - 234.57) ms+4.4%✅⬆️
process.time_to_main_ms513.22 ± (512.09 - 514.35) ms540.71 ± (539.51 - 541.90) ms+5.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.84 ± (47.81 - 47.88) MB47.82 ± (47.80 - 47.84) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms20.94 ± (20.91 - 20.98) ms21.72 ± (21.68 - 21.77) ms+3.7%✅⬆️
process.time_to_main_ms72.04 ± (71.89 - 72.19) ms76.35 ± (76.15 - 76.55) ms+6.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.62) MB10.62 ± (10.62 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.94 ± (20.90 - 20.98) ms21.70 ± (21.65 - 21.75) ms+3.6%✅⬆️
process.time_to_main_ms73.52 ± (73.34 - 73.70) ms77.84 ± (77.64 - 78.03) ms+5.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.72 - 10.73) MB10.73 ± (10.73 - 10.74) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms387.60 ± (385.33 - 389.87) ms382.65 ± (380.30 - 385.00) ms-1.3%
process.time_to_main_ms517.00 ± (515.88 - 518.13) ms538.25 ± (537.20 - 539.30) ms+4.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.88 ± (49.85 - 49.91) MB49.94 ± (49.92 - 49.97) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.16 ± (19.12 - 19.19) ms20.19 ± (20.13 - 20.24) ms+5.4%✅⬆️
process.time_to_main_ms71.08 ± (70.94 - 71.22) ms76.34 ± (76.16 - 76.52) ms+7.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.65 - 7.66) MB7.68 ± (7.68 - 7.69) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.25 ± (19.21 - 19.29) ms20.19 ± (20.14 - 20.25) ms+4.9%✅⬆️
process.time_to_main_ms72.73 ± (72.57 - 72.88) ms77.38 ± (77.18 - 77.58) ms+6.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.74) MB7.76 ± (7.75 - 7.77) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms305.99 ± (303.67 - 308.30) ms309.90 ± (307.53 - 312.27) ms+1.3%✅⬆️
process.time_to_main_ms475.66 ± (474.87 - 476.45) ms497.54 ± (496.66 - 498.43) ms+4.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.95 ± (36.93 - 36.98) MB36.98 ± (36.95 - 37.00) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.6%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration188.55 ± (188.52 - 189.09) ms188.87 ± (188.81 - 189.57) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration191.92 ± (191.86 - 192.22) ms192.47 ± (192.45 - 192.79) ms+0.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1125.77 ± (1124.60 - 1133.46) ms1128.55 ± (1131.08 - 1137.65) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms183.86 ± (183.55 - 184.17) ms184.58 ± (184.32 - 184.84) ms+0.4%✅⬆️
process.time_to_main_ms79.11 ± (78.94 - 79.27) ms79.26 ± (79.07 - 79.44) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.05 - 16.20) MB16.19 ± (16.16 - 16.22) MB+0.4%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.3%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms183.46 ± (183.22 - 183.70) ms183.89 ± (183.64 - 184.13) ms+0.2%✅⬆️
process.time_to_main_ms80.28 ± (80.19 - 80.37) ms80.28 ± (80.19 - 80.37) ms-0.0%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.24 - 16.35) MB16.17 ± (16.15 - 16.20) MB-0.7%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)-0.4%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms388.23 ± (387.09 - 389.38) ms389.43 ± (388.16 - 390.71) ms+0.3%✅⬆️
process.time_to_main_ms497.49 ± (496.49 - 498.49) ms501.13 ± (499.94 - 502.32) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.37 ± (57.15 - 57.58) MB57.85 ± (57.61 - 58.09) MB+0.8%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 6 - Baseline
process.internal_duration_ms188.14 ± (187.89 - 188.38) ms188.59 ± (188.35 - 188.84) ms+0.2%✅⬆️
process.time_to_main_ms68.69 ± (68.60 - 68.78) ms68.97 ± (68.81 - 69.14) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.62 ± (15.44 - 15.79) MB15.81 ± (15.64 - 15.98) MB+1.3%✅⬆️
runtime.dotnet.threads.count18 ± (17 - 18)18 ± (17 - 18)+0.8%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms187.18 ± (187.00 - 187.36) ms187.82 ± (187.63 - 188.01) ms+0.3%✅⬆️
process.time_to_main_ms69.77 ± (69.71 - 69.83) ms69.82 ± (69.76 - 69.88) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.43 ± (15.25 - 15.60) MB15.74 ± (15.57 - 15.92) MB+2.1%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 19)19 ± (18 - 19)+0.5%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms594.73 ± (591.47 - 597.99) ms594.68 ± (591.13 - 598.23) ms-0.0%
process.time_to_main_ms500.57 ± (499.92 - 501.22) ms502.94 ± (502.08 - 503.80) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.39 ± (61.29 - 61.48) MB61.43 ± (61.33 - 61.53) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 8 - Baseline
process.internal_duration_ms185.41 ± (185.20 - 185.62) ms186.13 ± (185.93 - 186.32) ms+0.4%✅⬆️
process.time_to_main_ms68.21 ± (68.04 - 68.38) ms68.31 ± (68.17 - 68.45) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.62 ± (11.51 - 11.72) MB11.63 ± (11.53 - 11.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count17 ± (17 - 18)17 ± (17 - 18)+0.1%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms184.93 ± (184.77 - 185.08) ms185.28 ± (185.11 - 185.45) ms+0.2%✅⬆️
process.time_to_main_ms69.19 ± (69.14 - 69.25) ms69.25 ± (69.20 - 69.30) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.54 ± (11.43 - 11.65) MB11.51 ± (11.39 - 11.63) MB-0.2%
runtime.dotnet.threads.count18 ± (18 - 19)18 ± (18 - 19)-0.7%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms519.91 ± (517.17 - 522.65) ms519.81 ± (517.37 - 522.25) ms-0.0%
process.time_to_main_ms458.27 ± (457.61 - 458.94) ms460.04 ± (459.31 - 460.77) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.69 ± (50.66 - 50.72) MB50.74 ± (50.71 - 50.77) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.0%✅⬆️
Comparison explanation

Execution-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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8392) - mean (76ms)  : 74, 78
    master - mean (72ms)  : 70, 74

    section Bailout
    This PR (8392) - mean (80ms)  : 78, 82
    master - mean (76ms)  : 75, 77

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (1,098ms)  : 1058, 1139
    master - mean (1,057ms)  : 1027, 1087

Loading
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 (8392) - mean (119ms)  : 115, 123
    master - mean (114ms)  : 111, 116

    section Bailout
    This PR (8392) - mean (120ms)  : crit, 117, 124
    master - mean (113ms)  : 111, 116

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (810ms)  : 782, 839
    master - mean (776ms)  : 754, 797

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8392) - mean (105ms)  : 101, 109
    master - mean (99ms)  : 96, 102

    section Bailout
    This PR (8392) - mean (106ms)  : crit, 103, 109
    master - mean (101ms)  : 98, 103

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (949ms)  : 917, 982
    master - mean (932ms)  : 895, 969

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8392) - mean (105ms)  : 101, 109
    master - mean (98ms)  : 95, 100

    section Bailout
    This PR (8392) - mean (106ms)  : crit, 103, 108
    master - mean (100ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (839ms)  : 805, 873
    master - mean (812ms)  : 774, 849

Loading
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 (8392) - mean (189ms)  : 186, 193
    master - mean (189ms)  : 186, 192

    section Bailout
    This PR (8392) - mean (193ms)  : 191, 194
    master - mean (192ms)  : 190, 194

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (1,134ms)  : 1088, 1181
    master - mean (1,129ms)  : 1080, 1178

Loading
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 (8392) - mean (272ms)  : 269, 275
    master - mean (271ms)  : 268, 274

    section Bailout
    This PR (8392) - mean (272ms)  : 268, 275
    master - mean (271ms)  : 269, 274

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (919ms)  : 901, 938
    master - mean (915ms)  : 898, 932

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8392) - mean (266ms)  : 262, 270
    master - mean (265ms)  : 261, 268

    section Bailout
    This PR (8392) - mean (265ms)  : 263, 268
    master - mean (265ms)  : 262, 267

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (1,125ms)  : 1071, 1179
    master - mean (1,126ms)  : 1080, 1172

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8392) - mean (264ms)  : 259, 268
    master - mean (263ms)  : 259, 268

    section Bailout
    This PR (8392) - mean (264ms)  : 261, 266
    master - mean (263ms)  : 261, 266

    section CallTarget+Inlining+NGEN
    This PR (8392) - mean (1,012ms)  : 979, 1046
    master - mean (1,010ms)  : 974, 1047

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants