Skip to content

[Tests] Use EnvironmentRestorer to prevent env var leaks#8388

Open
lucaspimentel wants to merge 4 commits intomasterfrom
lpimentel/use-test-environment-restorer
Open

[Tests] Use EnvironmentRestorer to prevent env var leaks#8388
lucaspimentel wants to merge 4 commits intomasterfrom
lpimentel/use-test-environment-restorer

Conversation

@lucaspimentel
Copy link
Copy Markdown
Member

Summary of changes

Add [EnvironmentRestorer] attribute to test classes/methods that call Environment.SetEnvironmentVariable without proper cleanup, preventing environment variable leaks between tests.

Reason for change

Several test files were setting environment variables without restoring them, which could cause flaky or order-dependent test failures due to leaked state.

Implementation details

  • EnvironmentRestorerAttribute: Allow usage on methods (AttributeTargets.Method) in addition to classes
  • TelemetrySettingsAgentlessSettingsTests: Replace manual IDisposable save/restore with class-level [EnvironmentRestorer]
  • AzurePerformanceCountersListenerTests: Add class-level [EnvironmentRestorer("WEBSITE_COUNTERS_CLR")] (previously had no restore at all)
  • LegacyCommandLineArgumentsTests.SetCi: Add method-level [EnvironmentRestorer("TF_BUILD")], remove manual try/finally
  • ConfigureCiCommandTests.ConfigureCi: Add method-level [EnvironmentRestorer("GITHUB_ENV")], remove manual save/restore
    • AutodetectCi keeps its manual try/finally because it clears all environment variables, which the attribute can't handle

Test coverage

Existing tests cover the affected functionality. No new tests needed — this is a cleanup of test infrastructure.

Other details

"I tried to leak an environment variable once, but it was restored before anyone noticed." — Claude 🤖

Replace manual save/restore patterns with the [EnvironmentRestorer]
attribute to prevent env var leaks between tests. Also allow the
attribute on methods (not just classes) for more targeted usage.

🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions github-actions bot added the area:tests unit tests, integration tests label Mar 30, 2026
@lucaspimentel lucaspimentel changed the title [Tests] Use EnvironmentRestorer to prevent env var leaks [Tests] Use EnvironmentRestorer to prevent env var leaks Mar 30, 2026
@lucaspimentel lucaspimentel marked this pull request as ready for review March 30, 2026 16:15
@lucaspimentel lucaspimentel requested a review from a team as a code owner March 30, 2026 16:15
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 30, 2026

Benchmarks

Benchmark execution time: 2026-03-30 21:49:45

Comparing candidate commit c29d481 in PR branch lpimentel/use-test-environment-restorer with baseline commit f22a608 in branch master.

Found 10 performance improvements and 9 performance regressions! Performance is the same for 253 metrics, 16 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟩 execution_time [-19.197ms; -19.044ms] or [-15.637%; -15.512%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 execution_time [+19.392ms; +24.643ms] or [+9.841%; +12.506%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 execution_time [+15.696ms; +22.066ms] or [+7.897%; +11.102%]
  • 🟩 throughput [+35176.049op/s; +57692.694op/s] or [+5.249%; +8.608%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟥 execution_time [+11.570ms; +16.819ms] or [+5.863%; +8.522%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-19.358ms; -16.893ms] or [-8.807%; -7.685%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+23.340ms; +24.322ms] or [+13.021%; +13.569%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟩 execution_time [-8.739ms; -6.560ms] or [-8.685%; -6.520%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+32.388ms; +40.203ms] or [+15.560%; +19.315%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0

  • 🟩 execution_time [-123.811µs; -119.669µs] or [-8.330%; -8.051%]
  • 🟩 throughput [+58.947op/s; +61.100op/s] or [+8.762%; +9.082%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • 🟩 execution_time [-1092.617µs; -814.875µs] or [-38.029%; -28.362%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+12.254ms; +15.373ms] or [+6.294%; +7.896%]
  • 🟩 throughput [+49213.795op/s; +56680.690op/s] or [+10.146%; +11.685%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟥 allocated_mem [+22.916KB; +22.954KB] or [+9.223%; +9.238%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟥 allocated_mem [+15.592KB; +15.618KB] or [+6.055%; +6.065%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+28.554ms; +31.394ms] or [+16.738%; +18.402%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • 🟩 throughput [+21217.059op/s; +28323.142op/s] or [+5.420%; +7.236%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟩 execution_time [-108.005ms; -106.504ms] or [-54.029%; -53.278%]

Copy link
Copy Markdown
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

dd-trace-dotnet-ci-bot bot commented Mar 30, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8388) 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.65 ± (71.82 - 72.11) ms71.45 ± (71.43 - 71.72) ms-0.3%
.NET Framework 4.8 - Bailout
duration76.17 ± (75.97 - 76.33) ms75.88 ± (75.85 - 76.18) ms-0.4%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1072.42 ± (1075.06 - 1081.86) ms1070.01 ± (1070.37 - 1076.16) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.34 ± (22.30 - 22.37) ms22.24 ± (22.21 - 22.27) ms-0.4%
process.time_to_main_ms83.18 ± (83.00 - 83.37) ms82.89 ± (82.71 - 83.08) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.92 - 10.93) MB10.92 ± (10.91 - 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.29 ± (22.26 - 22.33) ms22.25 ± (22.21 - 22.28) ms-0.2%
process.time_to_main_ms84.31 ± (84.10 - 84.51) ms84.75 ± (84.54 - 84.96) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.97) MB10.94 ± (10.94 - 10.95) MB-0.2%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms223.68 ± (222.31 - 225.05) ms220.91 ± (219.77 - 222.05) ms-1.2%
process.time_to_main_ms531.77 ± (530.27 - 533.27) ms530.56 ± (529.28 - 531.84) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.34 ± (48.31 - 48.37) MB48.28 ± (48.25 - 48.30) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 6 - Baseline
process.internal_duration_ms21.06 ± (21.02 - 21.09) ms20.98 ± (20.95 - 21.02) ms-0.3%
process.time_to_main_ms72.51 ± (72.33 - 72.68) ms72.11 ± (71.95 - 72.27) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.62 - 10.63) MB10.64 ± (10.64 - 10.64) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.93 ± (20.90 - 20.96) ms20.93 ± (20.89 - 20.96) ms-0.0%
process.time_to_main_ms73.38 ± (73.20 - 73.56) ms73.07 ± (72.93 - 73.21) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.73 - 10.74) MB10.74 ± (10.74 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms388.09 ± (385.80 - 390.39) ms384.61 ± (382.25 - 386.98) ms-0.9%
process.time_to_main_ms531.60 ± (530.43 - 532.76) ms532.04 ± (531.12 - 532.97) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.32 ± (50.29 - 50.35) MB50.33 ± (50.31 - 50.36) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.4%
.NET 8 - Baseline
process.internal_duration_ms19.20 ± (19.16 - 19.23) ms19.20 ± (19.17 - 19.24) ms+0.0%✅⬆️
process.time_to_main_ms71.51 ± (71.34 - 71.67) ms71.42 ± (71.26 - 71.58) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.69 - 7.70) MB7.70 ± (7.69 - 7.71) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.31 ± (19.27 - 19.35) ms19.26 ± (19.22 - 19.29) ms-0.3%
process.time_to_main_ms72.94 ± (72.80 - 73.08) ms72.66 ± (72.52 - 72.81) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.76 ± (7.76 - 7.77) MB7.73 ± (7.73 - 7.74) MB-0.4%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms307.20 ± (305.03 - 309.37) ms306.93 ± (304.83 - 309.03) ms-0.1%
process.time_to_main_ms491.14 ± (490.32 - 491.96) ms489.41 ± (488.59 - 490.24) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.27 ± (37.25 - 37.29) MB37.27 ± (37.25 - 37.29) MB-0.0%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.0%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration213.25 ± (213.22 - 214.15) ms206.12 ± (205.83 - 206.79) ms-3.3%
.NET Framework 4.8 - Bailout
duration216.55 ± (216.28 - 217.36) ms211.90 ± (211.49 - 212.42) ms-2.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1256.51 ± (1254.71 - 1261.23) ms1211.26 ± (1212.65 - 1219.61) ms-3.6%
.NET Core 3.1 - Baseline
process.internal_duration_ms209.08 ± (208.56 - 209.61) ms200.68 ± (200.22 - 201.13) ms-4.0%
process.time_to_main_ms90.94 ± (90.66 - 91.23) ms86.96 ± (86.70 - 87.22) ms-4.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.94 ± (15.92 - 15.97) MB15.96 ± (15.95 - 15.98) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.6%
.NET Core 3.1 - Bailout
process.internal_duration_ms209.89 ± (209.33 - 210.45) ms199.75 ± (199.34 - 200.16) ms-4.8%
process.time_to_main_ms93.12 ± (92.85 - 93.40) ms88.52 ± (88.21 - 88.84) ms-4.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.93 ± (15.91 - 15.95) MB16.09 ± (16.06 - 16.11) MB+1.0%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.7%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms422.87 ± (421.50 - 424.23) ms411.40 ± (410.23 - 412.57) ms-2.7%
process.time_to_main_ms571.47 ± (569.88 - 573.07) ms553.16 ± (551.86 - 554.46) ms-3.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.04 ± (58.99 - 59.09) MB59.12 ± (59.07 - 59.17) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.5%
.NET 6 - Baseline
process.internal_duration_ms215.96 ± (215.43 - 216.49) ms206.23 ± (205.71 - 206.75) ms-4.5%
process.time_to_main_ms79.87 ± (79.57 - 80.17) ms75.68 ± (75.44 - 75.92) ms-5.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.16 - 16.21) MB16.30 ± (16.27 - 16.32) MB+0.7%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 20)-0.4%
.NET 6 - Bailout
process.internal_duration_ms214.57 ± (214.07 - 215.07) ms206.40 ± (205.94 - 206.86) ms-3.8%
process.time_to_main_ms80.80 ± (80.54 - 81.06) ms77.21 ± (77.00 - 77.42) ms-4.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.25 ± (16.22 - 16.27) MB16.35 ± (16.33 - 16.38) MB+0.7%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)20 ± (20 - 21)-0.2%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms598.71 ± (596.16 - 601.26) ms599.83 ± (597.15 - 602.51) ms+0.2%✅⬆️
process.time_to_main_ms576.99 ± (575.60 - 578.37) ms556.79 ± (555.70 - 557.88) ms-3.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.45 ± (61.35 - 61.55) MB61.87 ± (61.78 - 61.95) MB+0.7%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.6%
.NET 8 - Baseline
process.internal_duration_ms211.90 ± (211.39 - 212.40) ms204.10 ± (203.69 - 204.50) ms-3.7%
process.time_to_main_ms78.51 ± (78.24 - 78.77) ms75.18 ± (74.88 - 75.48) ms-4.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.61 ± (11.59 - 11.63) MB11.71 ± (11.69 - 11.72) MB+0.8%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.4%
.NET 8 - Bailout
process.internal_duration_ms211.73 ± (211.18 - 212.29) ms203.95 ± (203.42 - 204.49) ms-3.7%
process.time_to_main_ms79.37 ± (79.14 - 79.59) ms76.66 ± (76.41 - 76.91) ms-3.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.59 ± (11.57 - 11.61) MB11.75 ± (11.73 - 11.77) MB+1.4%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-2.2%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms563.52 ± (555.81 - 571.23) ms530.91 ± (525.10 - 536.72) ms-5.8%
process.time_to_main_ms529.53 ± (528.52 - 530.55) ms513.50 ± (512.69 - 514.32) ms-3.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.36 ± (51.26 - 51.46) MB50.96 ± (50.89 - 51.02) MB-0.8%
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 (8388) - mean (72ms)  : 69, 74
    master - mean (72ms)  : 70, 74

    section Bailout
    This PR (8388) - mean (76ms)  : 74, 78
    master - mean (76ms)  : 74, 78

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (1,073ms)  : 1032, 1114
    master - mean (1,078ms)  : 1030, 1127

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 (8388) - mean (112ms)  : 108, 115
    master - mean (112ms)  : 108, 116

    section Bailout
    This PR (8388) - mean (114ms)  : 111, 116
    master - mean (113ms)  : 110, 116

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (789ms)  : 767, 812
    master - mean (795ms)  : 778, 812

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8388) - mean (99ms)  : 96, 103
    master - mean (100ms)  : 95, 105

    section Bailout
    This PR (8388) - mean (100ms)  : 98, 102
    master - mean (100ms)  : 98, 103

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (944ms)  : 908, 980
    master - mean (948ms)  : 907, 989

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

    section Bailout
    This PR (8388) - mean (99ms)  : 97, 102
    master - mean (100ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (830ms)  : 793, 867
    master - mean (829ms)  : 795, 862

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 (8388) - mean (206ms)  : 201, 212
    master - mean (214ms)  : 209, 219

    section Bailout
    This PR (8388) - mean (212ms)  : 207, 216
    master - mean (217ms)  : 211, 223

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (1,216ms)  : 1167, 1266
    master - mean (1,258ms)  : 1211, 1305

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 (8388) - mean (297ms)  : 289, 305
    master - mean (310ms)  : 303, 316

    section Bailout
    This PR (8388) - mean (298ms)  : 290, 305
    master - mean (312ms)  : 305, 320

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (1,000ms)  : 966, 1033
    master - mean (1,035ms)  : 1001, 1070

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8388) - mean (291ms)  : 284, 298
    master - mean (305ms)  : 296, 315

    section Bailout
    This PR (8388) - mean (292ms)  : 285, 300
    master - mean (304ms)  : 298, 310

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (1,188ms)  : 1149, 1226
    master - mean (1,205ms)  : 1169, 1242

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8388) - mean (290ms)  : 284, 296
    master - mean (301ms)  : 291, 311

    section Bailout
    This PR (8388) - mean (291ms)  : 285, 298
    master - mean (302ms)  : 294, 310

    section CallTarget+Inlining+NGEN
    This PR (8388) - mean (1,075ms)  : 999, 1151
    master - mean (1,127ms)  : 1013, 1241

Loading

lucaspimentel and others added 3 commits March 30, 2026 16:42
…eCountersListenerTests.cs

Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
🤖 Co-Authored-By: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants