Skip to content

Conversation

@chrisnas
Copy link
Contributor

Summary of changes

Make the number of monitored live objects customizable via environment variable and change the default value to 4096

Reason for change

The current 1024 maximum was to small especially in case of memory leak

Implementation details

Add the corresponding env var helpers in the configuration and use it in the LiveObjectsProvider

Test coverage

Tests have been added

Other details

@chrisnas chrisnas requested a review from a team as a code owner November 26, 2025 17:05
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Nov 26, 2025
@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7872) 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
duration75.54 ± (75.66 - 76.57) ms75.25 ± (75.13 - 75.98) ms-0.4%
.NET Framework 4.8 - Bailout
duration78.44 ± (78.48 - 79.27) ms81.06 ± (80.86 - 81.61) ms+3.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1056.60 ± (1061.10 - 1072.97) ms1057.16 ± (1061.81 - 1072.74) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.97 ± (22.88 - 23.06) ms22.83 ± (22.75 - 22.91) ms-0.6%
process.time_to_main_ms87.39 ± (86.98 - 87.79) ms87.56 ± (87.24 - 87.88) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.92 ± (10.92 - 10.92) MB-0.1%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.71 ± (22.65 - 22.77) ms22.60 ± (22.55 - 22.66) ms-0.5%
process.time_to_main_ms87.50 ± (87.17 - 87.84) ms88.27 ± (87.92 - 88.62) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.97 ± (10.97 - 10.97) MB10.96 ± (10.96 - 10.96) MB-0.1%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms219.96 ± (218.38 - 221.54) ms222.96 ± (221.15 - 224.76) ms+1.4%✅⬆️
process.time_to_main_ms496.03 ± (494.81 - 497.24) ms501.96 ± (500.96 - 502.95) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.77 ± (47.75 - 47.79) MB47.81 ± (47.79 - 47.83) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.4%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.76 ± (21.68 - 21.83) ms21.48 ± (21.42 - 21.53) ms-1.3%
process.time_to_main_ms75.80 ± (75.44 - 76.15) ms74.63 ± (74.31 - 74.94) ms-1.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.62 - 10.63) MB10.61 ± (10.61 - 10.62) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.81 ± (21.74 - 21.88) ms21.53 ± (21.47 - 21.60) ms-1.3%
process.time_to_main_ms77.97 ± (77.66 - 78.28) ms76.79 ± (76.52 - 77.06) ms-1.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.70 ± (10.70 - 10.71) MB10.72 ± (10.71 - 10.72) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms211.50 ± (210.08 - 212.92) ms213.44 ± (210.82 - 216.06) ms+0.9%✅⬆️
process.time_to_main_ms467.65 ± (466.65 - 468.65) ms464.44 ± (463.48 - 465.41) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.99 ± (47.97 - 48.02) MB47.93 ± (47.91 - 47.95) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms20.16 ± (20.08 - 20.23) ms19.83 ± (19.77 - 19.90) ms-1.6%
process.time_to_main_ms76.89 ± (76.50 - 77.28) ms74.46 ± (74.11 - 74.81) ms-3.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.65 ± (7.64 - 7.65) MB-0.4%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.83 ± (19.77 - 19.88) ms19.86 ± (19.80 - 19.93) ms+0.2%✅⬆️
process.time_to_main_ms76.76 ± (76.39 - 77.13) ms76.37 ± (76.06 - 76.67) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.69 ± (7.69 - 7.70) MB-0.5%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms191.97 ± (191.08 - 192.85) ms194.86 ± (193.94 - 195.78) ms+1.5%✅⬆️
process.time_to_main_ms454.27 ± (453.29 - 455.25) ms460.92 ± (459.96 - 461.88) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.49 ± (36.45 - 36.53) MB36.51 ± (36.47 - 36.55) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.1%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration194.92 ± (194.70 - 195.36) ms197.20 ± (197.39 - 198.55) ms+1.2%✅⬆️
.NET Framework 4.8 - Bailout
duration198.30 ± (198.03 - 198.51) ms201.01 ± (200.99 - 202.04) ms+1.4%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1123.56 ± (1125.23 - 1133.30) ms1175.54 ± (1176.68 - 1185.94) ms+4.6%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms190.14 ± (189.82 - 190.46) ms193.75 ± (193.31 - 194.19) ms+1.9%✅⬆️
process.time_to_main_ms81.84 ± (81.64 - 82.03) ms88.17 ± (87.91 - 88.44) ms+7.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.04 - 16.09) MB16.38 ± (16.37 - 16.40) MB+2.0%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms190.16 ± (189.76 - 190.57) ms194.35 ± (193.87 - 194.83) ms+2.2%✅⬆️
process.time_to_main_ms83.18 ± (82.97 - 83.39) ms89.65 ± (89.37 - 89.92) ms+7.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.12 - 16.16) MB16.32 ± (16.30 - 16.34) MB+1.1%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)+0.2%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms407.30 ± (404.37 - 410.23) ms415.28 ± (412.75 - 417.82) ms+2.0%✅⬆️
process.time_to_main_ms478.02 ± (477.48 - 478.57) ms496.76 ± (495.64 - 497.89) ms+3.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.85 ± (58.75 - 58.95) MB59.22 ± (59.16 - 59.29) MB+0.6%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 29)-0.1%
.NET 6 - Baseline
process.internal_duration_ms193.89 ± (193.56 - 194.22) ms197.49 ± (197.06 - 197.92) ms+1.9%✅⬆️
process.time_to_main_ms70.73 ± (70.57 - 70.89) ms75.93 ± (75.69 - 76.17) ms+7.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.40 ± (16.37 - 16.43) MB16.50 ± (16.48 - 16.52) MB+0.6%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.9%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms194.00 ± (193.71 - 194.28) ms195.96 ± (195.50 - 196.42) ms+1.0%✅⬆️
process.time_to_main_ms72.27 ± (72.11 - 72.42) ms76.17 ± (75.97 - 76.37) ms+5.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.33 ± (16.23 - 16.44) MB16.58 ± (16.56 - 16.60) MB+1.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.7%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms418.71 ± (416.09 - 421.34) ms429.78 ± (426.47 - 433.09) ms+2.6%✅⬆️
process.time_to_main_ms447.45 ± (446.80 - 448.09) ms460.65 ± (459.45 - 461.84) ms+2.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed59.26 ± (59.16 - 59.36) MB59.26 ± (59.15 - 59.38) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)29 ± (29 - 29)-0.5%
.NET 8 - Baseline
process.internal_duration_ms192.07 ± (191.81 - 192.34) ms194.36 ± (193.98 - 194.75) ms+1.2%✅⬆️
process.time_to_main_ms70.67 ± (70.47 - 70.87) ms72.81 ± (72.56 - 73.05) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.78) MB11.83 ± (11.82 - 11.85) MB+0.7%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.2%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms191.55 ± (191.29 - 191.80) ms194.03 ± (193.61 - 194.46) ms+1.3%✅⬆️
process.time_to_main_ms71.50 ± (71.40 - 71.60) ms74.02 ± (73.83 - 74.21) ms+3.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.83 ± (11.80 - 11.85) MB11.92 ± (11.90 - 11.94) MB+0.8%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms370.49 ± (369.13 - 371.86) ms373.15 ± (371.78 - 374.52) ms+0.7%✅⬆️
process.time_to_main_ms438.32 ± (437.58 - 439.07) ms443.39 ± (442.44 - 444.34) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.88 ± (47.84 - 47.91) MB47.99 ± (47.96 - 48.02) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.1%✅⬆️
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 (7872) - mean (76ms)  : 69, 82
    master - mean (76ms)  : 70, 83

    section Bailout
    This PR (7872) - mean (81ms)  : 76, 87
    master - mean (79ms)  : 73, 85

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (1,067ms)  : 988, 1146
    master - mean (1,067ms)  : 976, 1158

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 (7872) - mean (118ms)  : 112, 124
    master - mean (118ms)  : 111, 125

    section Bailout
    This PR (7872) - mean (118ms)  : 113, 124
    master - mean (118ms)  : 111, 125

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (761ms)  : 716, 805
    master - mean (758ms)  : 720, 796

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7872) - mean (103ms)  : 97, 109
    master - mean (105ms)  : 98, 111

    section Bailout
    This PR (7872) - mean (105ms)  : 100, 111
    master - mean (107ms)  : 100, 114

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (710ms)  : 658, 763
    master - mean (719ms)  : 677, 762

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7872) - mean (102ms)  : 96, 109
    master - mean (106ms)  : 98, 114

    section Bailout
    This PR (7872) - mean (105ms)  : 99, 111
    master - mean (105ms)  : 98, 112

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (685ms)  : 655, 716
    master - mean (690ms)  : 661, 720

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 (7872) - mean (198ms)  : 189, 207
    master - mean (195ms)  : 192, 198

    section Bailout
    This PR (7872) - mean (202ms)  : 194, 209
    master - mean (198ms)  : 196, 201

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (1,181ms)  : 1110, 1253
    master - mean (1,129ms)  : 1071, 1188

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 (7872) - mean (292ms)  : 282, 303
    master - mean (280ms)  : 276, 285

    section Bailout
    This PR (7872) - mean (295ms)  : 284, 306
    master - mean (281ms)  : 276, 287

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (975ms)  : 933, 1016
    master - mean (924ms)  : 880, 969

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7872) - mean (283ms)  : 273, 293
    master - mean (274ms)  : 267, 280

    section Bailout
    This PR (7872) - mean (282ms)  : 273, 291
    master - mean (275ms)  : 270, 279

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (944ms)  : 875, 1012
    master - mean (902ms)  : 860, 944

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7872) - mean (278ms)  : 271, 285
    master - mean (273ms)  : 267, 278

    section Bailout
    This PR (7872) - mean (279ms)  : 270, 288
    master - mean (273ms)  : 269, 276

    section CallTarget+Inlining+NGEN
    This PR (7872) - mean (871ms)  : 839, 903
    master - mean (839ms)  : 813, 865

Loading

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

Labels

area:profiler Issues related to the continous-profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants