Skip to content

Add a fixed cutoff for the activity handler reconcilliation loop for OTel#8576

Merged
andrewlock merged 1 commit into
masterfrom
andrew/revert-weak-reference-resolution
May 7, 2026
Merged

Add a fixed cutoff for the activity handler reconcilliation loop for OTel#8576
andrewlock merged 1 commit into
masterfrom
andrew/revert-weak-reference-resolution

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

Don't auto-close closed-Activity related Scope which have been closed for < 1 minute

Reason for change

In #8549, we moved the "CloseActivitySlow" reconciliation step when an Activity is closed but we somehow "missed" the StopActivity() call into a background job. We don't have a known mechanism for how that would happen today, and so this seemed reasonable.

There's a non-ideal aspect to this in terms of AsyncLocal<T> and execution context flow, in that we're now closing the Scope from a background task, that's off the original async context that created it. This will theoretically mean that the ActiveScope flow doesn't work correctly (needs confirming, but it's plausible).

This is mostly "OK" given we don't have a known mechanism where we would hit this path however, we also introduced a race condition, where a given Activity is closed, and is in the process of calling StopActivity, when our background loop executes. In that case we preemptively close it from the background thread.

Implementation details

As a workaround, this PR simply adds a 1 minute cutoff before we start closing the associated Scope, on the basis that this should be plenty of time for our inline handler to run if it's going to. This isn't ideal, as it's somewhat of a hacky workaround, but then, so is the CloseActivitySlow process anyway 😅

The other option is that we move the reconciliation back into the hot path, but that doesn't seem worth the trade off to me, especially as we consider this to be an unknown edge case anyway, and it's more there for safety than anything else.

Test coverage

Added a test to confirm that a "freshly" closed Activity is ignored, and it's only an "old" closed Activity that gets swept

Other details

Related to https://datadoghq.atlassian.net/browse/APMS-19316.

@andrewlock
andrewlock requested review from a team as code owners May 6, 2026 17:05
@andrewlock
andrewlock requested a review from anna-git May 6, 2026 17:05

@zacharycmontoya zacharycmontoya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, nice approach here!

@pr-commenter

pr-commenter Bot commented May 6, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-06 18:07:46

Comparing candidate commit 708fcf5 in PR branch andrew/revert-weak-reference-resolution with baseline commit 21ec312 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 58 known flaky benchmarks, 29 flaky benchmarks without significant changes.

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 ----------------------------------'

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-9080.850op/s; -8538.756op/s] or [-10.767%; -10.124%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-7397.842op/s; -5296.385op/s] or [-7.522%; -5.385%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+310.810ms; +315.529ms] or [+154.235%; +156.577%]
  • 🟥 throughput [-44.894op/s; -41.023op/s] or [-8.077%; -7.381%]

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

  • 🟥 execution_time [+376.909ms; +377.562ms] or [+297.781%; +298.297%]
  • 🟩 throughput [+98.407op/s; +99.631op/s] or [+12.975%; +13.136%]

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

  • 🟥 execution_time [+390.936ms; +392.808ms] or [+345.964%; +347.620%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-15.777ms; -11.604ms] or [-7.368%; -5.419%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.502%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-255620.287op/s; -251404.579op/s] or [-26.100%; -25.670%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.733ms; -21.888ms] or [-11.922%; -9.761%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-143867.626op/s; -127994.356op/s] or [-20.671%; -18.390%]

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

  • 🟩 throughput [+9610.517op/s; +12554.822op/s] or [+6.115%; +7.988%]

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

  • 🟩 throughput [+10617.631op/s; +13266.219op/s] or [+8.458%; +10.568%]

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

  • 🟩 throughput [+426550.516op/s; +446745.861op/s] or [+14.223%; +14.896%]

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

  • 🟩 execution_time [-18.567ms; -14.203ms] or [-8.558%; -6.547%]
  • 🟩 throughput [+210630.421op/s; +264095.464op/s] or [+8.360%; +10.483%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+299.899ms; +300.563ms] or [+149.849%; +150.181%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+300.212ms; +303.646ms] or [+151.398%; +153.129%]

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

  • 🟥 execution_time [+299.483ms; +301.860ms] or [+150.856%; +152.054%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.940ms; +298.800ms] or [+146.336%; +146.759%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+295.721ms; +298.342ms] or [+144.567%; +145.849%]

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

  • 🟥 execution_time [+298.061ms; +300.185ms] or [+148.970%; +150.032%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+21.156µs; +44.785µs] or [+6.754%; +14.298%]
  • 🟥 throughput [-418.043op/s; -219.209op/s] or [-13.032%; -6.833%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.953ms; +300.601ms] or [+149.707%; +150.031%]

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

  • unstable execution_time [+371.743ms; +403.690ms] or [+403.914%; +438.626%]
  • 🟩 throughput [+1155.907op/s; +1273.631op/s] or [+9.498%; +10.466%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+276.150ms; +319.269ms] or [+209.678%; +242.418%]
  • 🟩 throughput [+677.904op/s; +878.753op/s] or [+6.563%; +8.507%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+372.536ms; +415.907ms] or [+171.288%; +191.230%]
  • 🟥 throughput [-572.990op/s; -538.470op/s] or [-51.919%; -48.791%]

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

  • unstable execution_time [+202.597ms; +335.826ms] or [+86.338%; +143.115%]
  • 🟥 throughput [-677.404op/s; -593.712op/s] or [-45.183%; -39.601%]

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

  • 🟥 execution_time [+343.336ms; +352.621ms] or [+205.355%; +210.908%]
  • 🟥 throughput [-399.744op/s; -364.426op/s] or [-27.834%; -25.374%]

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

  • 🟩 execution_time [-187.453µs; -150.146µs] or [-9.496%; -7.606%]
  • 🟩 throughput [+43.726op/s; +53.624op/s] or [+8.632%; +10.586%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+301.923ms; +303.854ms] or [+152.043%; +153.015%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+302.739ms; +304.393ms] or [+151.703%; +152.532%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+302.297ms; +305.419ms] or [+151.861%; +153.430%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.296ms; +304.280ms] or [+151.803%; +152.799%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+300.242ms; +302.280ms] or [+148.456%; +149.464%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+304.725ms; +308.289ms] or [+154.448%; +156.255%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+300.300ms; +302.439ms] or [+150.724%; +151.797%]

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

  • 🟥 execution_time [+299.641ms; +302.387ms] or [+149.344%; +150.712%]
  • 🟩 throughput [+59267.506op/s; +64981.725op/s] or [+11.769%; +12.903%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+300.747ms; +303.345ms] or [+149.619%; +150.911%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-15.862ms; -11.992ms] or [-7.376%; -5.577%]

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

  • 🟩 allocated_mem [-27.438KB; -27.417KB] or [-10.009%; -10.001%]
  • unstable execution_time [-43.684µs; +9.076µs] or [-8.634%; +1.794%]

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

  • unstable execution_time [+6.477µs; +10.840µs] or [+15.309%; +25.622%]
  • 🟥 throughput [-4758.878op/s; -2926.105op/s] or [-20.033%; -12.318%]

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

  • unstable execution_time [-14.258µs; -7.086µs] or [-22.121%; -10.994%]
  • 🟩 throughput [+1840.536op/s; +3363.364op/s] or [+11.292%; +20.635%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.014ms; +302.543ms] or [+152.149%; +152.922%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+302.961ms; +305.602ms] or [+154.206%; +155.550%]

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

  • 🟥 execution_time [+299.833ms; +302.005ms] or [+150.104%; +151.191%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟩 throughput [+29846.231op/s; +35340.231op/s] or [+5.649%; +6.689%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.549ms; +302.275ms] or [+149.796%; +150.657%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+299.781ms; +301.575ms] or [+150.536%; +151.437%]

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

  • 🟥 execution_time [+302.705ms; +304.936ms] or [+153.512%; +154.644%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.665ms; +301.368ms] or [+149.973%; +150.324%]
  • 🟩 throughput [+61446212.914op/s; +61716538.158op/s] or [+44.749%; +44.946%]

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

  • unstable execution_time [+374.741ms; +408.016ms] or [+466.057%; +507.440%]
  • 🟩 throughput [+1003.183op/s; +1169.914op/s] or [+7.755%; +9.044%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.250ms; +300.170ms] or [+149.259%; +149.718%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+71929.364op/s; +84308.876op/s] or [+6.716%; +7.872%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 throughput [+54029.557op/s; +73730.309op/s] or [+6.254%; +8.534%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+81660.035op/s; +92637.953op/s] or [+8.110%; +9.200%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+45536.993op/s; +50392.164op/s] or [+8.269%; +9.150%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

  • 🟩 throughput [+26436.751op/s; +36618.204op/s] or [+5.917%; +8.196%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+88239.368op/s; +105645.235op/s] or [+9.859%; +11.803%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8576) 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
duration74.39 ± (74.46 - 75.02) ms74.75 ± (74.74 - 75.36) ms+0.5%✅⬆️
.NET Framework 4.8 - Bailout
duration77.85 ± (77.66 - 78.04) ms77.88 ± (77.78 - 78.27) ms+0.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1133.30 ± (1130.43 - 1138.12) ms1134.71 ± (1132.23 - 1137.99) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.54 ± (22.51 - 22.58) ms22.55 ± (22.51 - 22.59) ms+0.0%✅⬆️
process.time_to_main_ms85.11 ± (84.91 - 85.31) ms84.31 ± (84.12 - 84.50) ms-0.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.90 - 10.91) 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.68 ± (22.62 - 22.73) ms22.53 ± (22.49 - 22.58) ms-0.6%
process.time_to_main_ms87.98 ± (87.65 - 88.30) ms86.59 ± (86.39 - 86.79) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.94 - 10.94) MB10.95 ± (10.95 - 10.95) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms206.02 ± (205.46 - 206.58) ms205.84 ± (205.24 - 206.45) ms-0.1%
process.time_to_main_ms571.01 ± (569.47 - 572.54) ms569.25 ± (567.84 - 570.66) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.82 ± (49.80 - 49.85) MB49.83 ± (49.80 - 49.85) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.9%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.31 ± (21.27 - 21.36) ms21.11 ± (21.07 - 21.14) ms-1.0%
process.time_to_main_ms74.11 ± (73.88 - 74.33) ms73.12 ± (72.92 - 73.31) ms-1.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.61) MB10.64 ± (10.64 - 10.64) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.59 ± (21.53 - 21.65) ms21.28 ± (21.22 - 21.33) ms-1.5%
process.time_to_main_ms77.58 ± (77.31 - 77.85) ms75.54 ± (75.25 - 75.83) ms-2.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.75) MB10.76 ± (10.75 - 10.76) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms357.00 ± (354.88 - 359.12) ms349.53 ± (347.70 - 351.37) ms-2.1%
process.time_to_main_ms563.48 ± (562.12 - 564.83) ms563.50 ± (562.04 - 564.96) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.02 ± (50.99 - 51.04) MB51.20 ± (51.18 - 51.23) MB+0.4%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.53 ± (19.50 - 19.56) ms19.77 ± (19.72 - 19.82) ms+1.2%✅⬆️
process.time_to_main_ms73.14 ± (72.97 - 73.31) ms74.65 ± (74.40 - 74.89) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.67) MB7.66 ± (7.66 - 7.67) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.64 ± (19.60 - 19.69) ms19.56 ± (19.52 - 19.60) ms-0.4%
process.time_to_main_ms74.92 ± (74.72 - 75.13) ms74.97 ± (74.79 - 75.16) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.71 - 7.72) MB7.70 ± (7.69 - 7.70) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms282.37 ± (279.70 - 285.04) ms294.10 ± (289.41 - 298.79) ms+4.2%✅⬆️
process.time_to_main_ms525.92 ± (524.50 - 527.33) ms526.29 ± (525.00 - 527.58) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.91 ± (37.88 - 37.93) MB37.84 ± (37.81 - 37.86) MB-0.2%
runtime.dotnet.threads.count27 ± (27 - 28)27 ± (27 - 28)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration208.78 ± (209.51 - 211.59) ms209.62 ± (211.75 - 214.42) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration215.85 ± (216.89 - 219.39) ms213.30 ± (215.14 - 217.42) ms-1.2%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1325.56 ± (1323.74 - 1333.13) ms1312.92 ± (1313.45 - 1320.58) ms-1.0%
.NET Core 3.1 - Baseline
process.internal_duration_ms207.97 ± (206.48 - 209.46) ms206.76 ± (205.58 - 207.93) ms-0.6%
process.time_to_main_ms90.18 ± (89.59 - 90.78) ms90.28 ± (89.68 - 90.89) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.91 ± (15.89 - 15.93) MB15.91 ± (15.89 - 15.93) MB+0.0%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.2%
.NET Core 3.1 - Bailout
process.internal_duration_ms208.40 ± (206.95 - 209.85) ms206.27 ± (205.17 - 207.38) ms-1.0%
process.time_to_main_ms91.84 ± (91.29 - 92.38) ms91.25 ± (90.75 - 91.75) ms-0.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.90 ± (15.89 - 15.92) MB15.95 ± (15.93 - 15.97) MB+0.3%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.2%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms397.85 ± (395.80 - 399.90) ms394.66 ± (393.09 - 396.23) ms-0.8%
process.time_to_main_ms606.15 ± (603.79 - 608.50) ms600.90 ± (598.84 - 602.97) ms-0.9%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.72 ± (59.59 - 59.86) MB59.42 ± (59.26 - 59.57) MB-0.5%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.2%
.NET 6 - Baseline
process.internal_duration_ms213.03 ± (211.79 - 214.28) ms210.49 ± (209.52 - 211.46) ms-1.2%
process.time_to_main_ms79.01 ± (78.53 - 79.49) ms78.48 ± (78.06 - 78.90) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.20 ± (16.17 - 16.22) MB16.25 ± (16.23 - 16.27) MB+0.4%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 20)20 ± (19 - 20)+0.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms211.91 ± (210.74 - 213.08) ms210.55 ± (209.55 - 211.55) ms-0.6%
process.time_to_main_ms79.95 ± (79.45 - 80.46) ms79.30 ± (78.95 - 79.65) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.20 ± (16.18 - 16.22) MB16.31 ± (16.29 - 16.33) MB+0.7%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 21)21 ± (20 - 21)+0.1%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms572.14 ± (568.40 - 575.89) ms569.94 ± (567.66 - 572.23) ms-0.4%
process.time_to_main_ms590.49 ± (588.36 - 592.62) ms586.27 ± (584.71 - 587.84) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.03 ± (61.96 - 62.09) MB61.96 ± (61.92 - 62.00) MB-0.1%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.0%
.NET 8 - Baseline
process.internal_duration_ms206.48 ± (205.36 - 207.59) ms206.39 ± (205.66 - 207.12) ms-0.0%
process.time_to_main_ms75.89 ± (75.42 - 76.36) ms76.23 ± (75.96 - 76.49) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.55 ± (11.53 - 11.57) MB11.54 ± (11.52 - 11.55) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms206.70 ± (205.50 - 207.89) ms204.83 ± (204.04 - 205.62) ms-0.9%
process.time_to_main_ms77.36 ± (76.96 - 77.76) ms77.11 ± (76.81 - 77.42) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.61 ± (11.59 - 11.63) MB11.64 ± (11.62 - 11.65) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.5%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms520.28 ± (513.11 - 527.44) ms519.55 ± (512.22 - 526.87) ms-0.1%
process.time_to_main_ms541.93 ± (539.77 - 544.09) ms541.58 ± (539.92 - 543.24) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.65 ± (51.59 - 51.71) MB51.61 ± (51.55 - 51.67) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+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 (8576) - mean (75ms)  : 71, 80
    master - mean (75ms)  : 71, 79

    section Bailout
    This PR (8576) - mean (78ms)  : 74, 82
    master - mean (78ms)  : 75, 80

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (1,135ms)  : 1094, 1176
    master - mean (1,134ms)  : 1079, 1190

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 (8576) - mean (114ms)  : 110, 117
    master - mean (114ms)  : 110, 119

    section Bailout
    This PR (8576) - mean (116ms)  : 113, 119
    master - mean (118ms)  : 112, 124

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (813ms)  : 785, 840
    master - mean (814ms)  : 785, 843

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8576) - mean (101ms)  : 97, 104
    master - mean (102ms)  : 99, 106

    section Bailout
    This PR (8576) - mean (104ms)  : 97, 110
    master - mean (106ms)  : 101, 111

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (945ms)  : 899, 991
    master - mean (950ms)  : 914, 986

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8576) - mean (103ms)  : 97, 108
    master - mean (100ms)  : 96, 105

    section Bailout
    This PR (8576) - mean (102ms)  : 100, 105
    master - mean (102ms)  : 98, 107

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (849ms)  : 772, 925
    master - mean (844ms)  : 776, 913

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 (8576) - mean (213ms)  : 193, 233
    master - mean (211ms)  : 196, 225

    section Bailout
    This PR (8576) - mean (216ms)  : 199, 233
    master - mean (218ms)  : 200, 236

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (1,317ms)  : 1266, 1368
    master - mean (1,328ms)  : 1257, 1400

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 (8576) - mean (311ms)  : 280, 342
    master - mean (314ms)  : 272, 356

    section Bailout
    This PR (8576) - mean (311ms)  : 281, 342
    master - mean (313ms)  : 280, 347

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (1,044ms)  : 1012, 1075
    master - mean (1,054ms)  : 1005, 1102

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8576) - mean (302ms)  : 274, 331
    master - mean (305ms)  : 276, 333

    section Bailout
    This PR (8576) - mean (301ms)  : 278, 324
    master - mean (304ms)  : 277, 331

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (1,195ms)  : 1151, 1238
    master - mean (1,202ms)  : 1136, 1267

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8576) - mean (295ms)  : 279, 310
    master - mean (294ms)  : 270, 319

    section Bailout
    This PR (8576) - mean (294ms)  : 275, 314
    master - mean (298ms)  : 269, 327

    section CallTarget+Inlining+NGEN
    This PR (8576) - mean (1,098ms)  : 996, 1200
    master - mean (1,109ms)  : 1006, 1211

Loading

@bouwkast bouwkast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@andrewlock
andrewlock merged commit d220d99 into master May 7, 2026
142 of 144 checks passed
@andrewlock
andrewlock deleted the andrew/revert-weak-reference-resolution branch May 7, 2026 07:04
@github-actions github-actions Bot added this to the vNext-v3 milestone May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants