Skip to content

[Debugger] Fix ConcurrentAdaptiveCache.GetOrAdd race that returned stale value#8584

Merged
dudikeleti merged 1 commit into
masterfrom
dudik/fix-concurrent-adaptive-cache-getoradd-race
May 11, 2026
Merged

[Debugger] Fix ConcurrentAdaptiveCache.GetOrAdd race that returned stale value#8584
dudikeleti merged 1 commit into
masterfrom
dudik/fix-concurrent-adaptive-cache-getoradd-race

Conversation

@dudikeleti

Copy link
Copy Markdown
Contributor

Summary of changes

  • Fix ConcurrentAdaptiveCache.GetOrAdd returning a stale local value (default/null) when another thread populated the entry between the initial TryGet miss and the write-lock acquisition.
  • Make the write-lock double-check branch consistent with the read-hit path: update LastAccessed, increment hit count, notify the eviction policy, and return the cached value.
  • Add a deterministic regression test in ConcurrentAdaptiveCacheTests that exercises the double-check branch via a custom comparer.

Reason for change

  • Concurrent callers of ConcurrentAdaptiveCache.GetOrAdd could observe default(T) (or null for reference/nullable values) for a key that was already populated, causing incorrect cached results in debugger redaction, span code origin, and other consumers of this cache.
  • LRU/LFU access counters and hit metrics were not updated when the double-check found the entry, leading to skewed eviction and hit-rate metrics under contention.

Implementation details

  • In ConcurrentAdaptiveCache.GetOrAdd, when the inner _cache.TryGetValue(key, out var item) succeeds under the write lock, return item.Value and call item.UpdateAccess(...), Interlocked.Increment(ref _hits), and _evictionPolicy.Access(key).
  • Mirrors the existing TryGet hit path so cache metadata (last accessed time, access count, eviction policy ordering, hit count) is consistent regardless of which path produced the hit.
  • No public API change. The eviction policy is invoked under the cache write lock, matching the existing call pattern in Add/AddOrUpdate.

Test coverage

ConcurrentAdaptiveCacheTests

@dudikeleti
dudikeleti requested a review from a team as a code owner May 7, 2026 14:28
@pr-commenter

pr-commenter Bot commented May 7, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-07 15:38:15

Comparing candidate commit 0703ae0 in PR branch dudik/fix-concurrent-adaptive-cache-getoradd-race with baseline commit 6d9882f 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 [-8969.619op/s; -8575.390op/s] or [-10.635%; -10.168%]

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

  • 🟥 throughput [-7437.384op/s; -6275.502op/s] or [-7.562%; -6.381%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+303.600ms; +308.870ms] or [+150.657%; +153.272%]
  • 🟥 throughput [-44.166op/s; -40.189op/s] or [-7.946%; -7.231%]

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

  • 🟥 execution_time [+377.393ms; +379.251ms] or [+298.164%; +299.631%]
  • 🟩 throughput [+95.660op/s; +98.818op/s] or [+12.612%; +13.029%]

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

  • 🟥 execution_time [+390.708ms; +392.571ms] or [+345.761%; +347.411%]

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.779ms; -11.613ms] or [-7.369%; -5.424%]

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 [-255230.246op/s; -252131.627op/s] or [-26.060%; -25.744%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.660ms; -21.821ms] or [-11.889%; -9.731%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-140678.247op/s; -124476.338op/s] or [-20.213%; -17.885%]

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

  • 🟩 throughput [+10727.719op/s; +13690.428op/s] or [+6.826%; +8.711%]

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

  • 🟩 throughput [+11844.104op/s; +14516.007op/s] or [+9.435%; +11.564%]

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

  • 🟩 throughput [+487398.864op/s; +509397.104op/s] or [+16.252%; +16.985%]

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

  • 🟩 execution_time [-18.553ms; -14.176ms] or [-8.552%; -6.535%]
  • 🟩 throughput [+193788.817op/s; +248999.886op/s] or [+7.692%; +9.883%]

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

  • 🟥 execution_time [+299.847ms; +300.545ms] or [+149.824%; +150.172%]

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

  • 🟥 execution_time [+300.257ms; +303.652ms] or [+151.420%; +153.133%]

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

  • 🟥 execution_time [+300.197ms; +302.812ms] or [+151.216%; +152.533%]

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

  • 🟥 execution_time [+297.599ms; +298.289ms] or [+146.169%; +146.508%]

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

  • 🟥 execution_time [+296.645ms; +299.419ms] or [+145.019%; +146.375%]

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

  • 🟥 execution_time [+298.800ms; +301.013ms] or [+149.340%; +150.446%]

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

  • 🟥 execution_time [+21.252µs; +44.968µs] or [+6.785%; +14.356%]
  • 🟥 throughput [-418.917op/s; -219.662op/s] or [-13.059%; -6.848%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.877ms; +300.546ms] or [+149.669%; +150.003%]

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

  • 🟥 execution_time [+413.914ms; +419.782ms] or [+449.735%; +456.111%]
  • 🟩 throughput [+1020.331op/s; +1125.914op/s] or [+8.384%; +9.252%]

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

  • unstable execution_time [+285.499ms; +325.426ms] or [+216.777%; +247.093%]
  • 🟩 throughput [+672.026op/s; +871.993op/s] or [+6.506%; +8.441%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+306.856ms; +353.142ms] or [+141.089%; +162.371%]
  • 🟥 throughput [-535.197op/s; -499.279op/s] or [-48.494%; -45.240%]

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

  • unstable execution_time [+205.959ms; +339.174ms] or [+87.771%; +144.542%]
  • 🟥 throughput [-670.368op/s; -586.804op/s] or [-44.714%; -39.140%]

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

  • 🟥 allocated_mem [+2.304KB; +2.308KB] or [+5.441%; +5.449%]
  • 🟥 execution_time [+338.966ms; +347.361ms] or [+202.741%; +207.762%]
  • 🟥 throughput [-409.097op/s; -373.548op/s] or [-28.485%; -26.010%]

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

  • 🟩 execution_time [-167.750µs; -127.469µs] or [-8.498%; -6.457%]
  • 🟩 throughput [+37.111op/s; +47.776op/s] or [+7.326%; +9.431%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+304.490ms; +306.454ms] or [+153.335%; +154.324%]

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

  • 🟥 execution_time [+303.289ms; +313.527ms] or [+151.979%; +157.109%]

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

  • 🟥 execution_time [+301.517ms; +304.683ms] or [+151.469%; +153.060%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+302.670ms; +304.238ms] or [+151.991%; +152.778%]

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

  • 🟥 execution_time [+297.008ms; +304.948ms] or [+146.857%; +150.783%]

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

  • 🟥 execution_time [+303.312ms; +307.456ms] or [+153.732%; +155.832%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+299.652ms; +301.698ms] or [+150.398%; +151.425%]

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

  • 🟥 execution_time [+299.675ms; +302.256ms] or [+149.360%; +150.647%]
  • 🟩 throughput [+62888.750op/s; +67931.244op/s] or [+12.488%; +13.489%]

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

  • 🟥 execution_time [+299.869ms; +302.463ms] or [+149.182%; +150.473%]

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

  • 🟩 execution_time [-16.605ms; -12.956ms] or [-7.721%; -6.024%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [+7.277µs; +48.205µs] or [+1.798%; +11.907%]

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

  • 🟩 allocated_mem [-26.095KB; -26.075KB] or [-9.519%; -9.511%]
  • unstable execution_time [-29.587µs; +23.272µs] or [-5.848%; +4.600%]

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

  • 🟩 allocated_mem [-18.680KB; -18.663KB] or [-6.810%; -6.804%]

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

  • 🟥 execution_time [+6.075µs; +9.986µs] or [+14.359%; +23.603%]
  • 🟥 throughput [-4603.150op/s; -2851.518op/s] or [-19.378%; -12.004%]

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

  • unstable execution_time [-13.173µs; -5.789µs] or [-20.437%; -8.981%]
  • 🟩 throughput [+1480.170op/s; +3028.358op/s] or [+9.081%; +18.580%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.378ms; +303.625ms] or [+152.838%; +153.469%]

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

  • 🟥 execution_time [+303.580ms; +305.614ms] or [+154.521%; +155.557%]

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

  • 🟥 execution_time [+300.805ms; +303.117ms] or [+150.590%; +151.748%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.869ms; +301.526ms] or [+149.458%; +150.283%]

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

  • 🟥 execution_time [+300.659ms; +302.221ms] or [+150.977%; +151.761%]

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

  • 🟥 execution_time [+303.126ms; +307.508ms] or [+153.726%; +155.948%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.352ms; +301.126ms] or [+149.817%; +150.203%]
  • 🟩 throughput [+61173133.261op/s; +61443017.080op/s] or [+44.550%; +44.747%]

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

  • unstable execution_time [+372.593ms; +410.608ms] or [+463.386%; +510.664%]
  • 🟩 throughput [+946.898op/s; +1135.300op/s] or [+7.320%; +8.776%]

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

  • 🟥 execution_time [+299.413ms; +300.358ms] or [+149.340%; +149.811%]

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

  • 🟩 throughput [+43554.906op/s; +62833.279op/s] or [+5.041%; +7.273%]

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

  • 🟩 throughput [+66748.898op/s; +75829.647op/s] or [+6.629%; +7.531%]

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

  • 🟩 throughput [+32192.161op/s; +40775.018op/s] or [+5.846%; +7.404%]

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

  • 🟩 throughput [+28178.807op/s; +37923.264op/s] or [+6.307%; +8.488%]

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

  • 🟩 throughput [+85462.689op/s; +109868.349op/s] or [+9.548%; +12.275%]

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.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0
  • 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 (8584) and master.

⚠️ Potential regressions detected

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration202.64 ± (203.29 - 204.97) ms212.94 ± (215.27 - 218.66) ms+5.1%❌⬆️
.NET Framework 4.8 - Bailout
duration207.02 ± (207.21 - 208.46) ms217.38 ± (219.71 - 223.17) ms+5.0%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1264.58 ± (1263.27 - 1269.26) ms1353.90 ± (1352.00 - 1362.09) ms+7.1%❌⬆️
Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration74.77 ± (74.78 - 75.47) ms72.63 ± (72.59 - 72.91) ms-2.9%
.NET Framework 4.8 - Bailout
duration79.43 ± (78.92 - 79.46) ms77.46 ± (77.32 - 77.68) ms-2.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1125.90 ± (1125.54 - 1132.96) ms1138.11 ± (1136.96 - 1144.55) ms+1.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.69 ± (22.62 - 22.75) ms22.74 ± (22.68 - 22.79) ms+0.2%✅⬆️
process.time_to_main_ms87.16 ± (86.80 - 87.51) ms86.98 ± (86.68 - 87.29) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.90 - 10.91) MB10.94 ± (10.94 - 10.94) MB+0.3%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.40 ± (22.36 - 22.44) ms22.84 ± (22.78 - 22.90) ms+2.0%✅⬆️
process.time_to_main_ms85.56 ± (85.35 - 85.76) ms90.12 ± (89.81 - 90.43) ms+5.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.95 - 10.96) MB10.97 ± (10.97 - 10.97) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms204.40 ± (203.79 - 205.00) ms206.38 ± (205.73 - 207.03) ms+1.0%✅⬆️
process.time_to_main_ms566.93 ± (565.53 - 568.34) ms571.00 ± (569.40 - 572.60) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.80 ± (49.77 - 49.83) MB49.81 ± (49.78 - 49.83) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.9%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.53 ± (21.47 - 21.59) ms21.37 ± (21.32 - 21.43) ms-0.7%
process.time_to_main_ms75.75 ± (75.46 - 76.03) ms74.78 ± (74.51 - 75.05) ms-1.3%
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_ms21.10 ± (21.06 - 21.13) ms21.55 ± (21.49 - 21.61) ms+2.2%✅⬆️
process.time_to_main_ms74.75 ± (74.58 - 74.93) ms77.47 ± (77.19 - 77.76) ms+3.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.74) MB10.75 ± (10.75 - 10.75) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms353.37 ± (351.28 - 355.46) ms354.03 ± (351.80 - 356.25) ms+0.2%✅⬆️
process.time_to_main_ms563.86 ± (562.44 - 565.28) ms566.78 ± (565.36 - 568.20) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.97 ± (50.94 - 50.99) MB51.20 ± (51.18 - 51.22) MB+0.5%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.83 ± (19.77 - 19.89) ms19.45 ± (19.41 - 19.48) ms-1.9%
process.time_to_main_ms75.12 ± (74.84 - 75.40) ms72.97 ± (72.81 - 73.12) ms-2.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.68 - 7.69) MB7.66 ± (7.66 - 7.67) MB-0.3%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.71 ± (19.65 - 19.77) ms19.80 ± (19.74 - 19.86) ms+0.5%✅⬆️
process.time_to_main_ms76.07 ± (75.79 - 76.34) ms76.26 ± (75.98 - 76.55) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.72 - 7.73) MB7.72 ± (7.71 - 7.72) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms280.42 ± (278.17 - 282.67) ms281.80 ± (279.17 - 284.43) ms+0.5%✅⬆️
process.time_to_main_ms521.49 ± (520.14 - 522.84) ms524.96 ± (523.68 - 526.23) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.86 ± (37.83 - 37.90) MB37.86 ± (37.83 - 37.89) MB-0.0%
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
duration202.64 ± (203.29 - 204.97) ms212.94 ± (215.27 - 218.66) ms+5.1%❌⬆️
.NET Framework 4.8 - Bailout
duration207.02 ± (207.21 - 208.46) ms217.38 ± (219.71 - 223.17) ms+5.0%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1264.58 ± (1263.27 - 1269.26) ms1353.90 ± (1352.00 - 1362.09) ms+7.1%❌⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms200.22 ± (199.53 - 200.92) ms211.57 ± (209.70 - 213.44) ms+5.7%✅⬆️
process.time_to_main_ms87.05 ± (86.71 - 87.39) ms94.51 ± (93.52 - 95.51) ms+8.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.96 ± (15.94 - 15.97) MB15.84 ± (15.82 - 15.86) MB-0.7%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.9%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms200.40 ± (199.56 - 201.25) ms214.68 ± (212.85 - 216.52) ms+7.1%✅⬆️
process.time_to_main_ms88.64 ± (88.27 - 89.02) ms95.67 ± (94.80 - 96.53) ms+7.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.98 ± (15.96 - 15.99) MB15.86 ± (15.85 - 15.88) MB-0.7%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.6%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms386.01 ± (384.62 - 387.41) ms403.65 ± (400.52 - 406.77) ms+4.6%✅⬆️
process.time_to_main_ms583.59 ± (581.82 - 585.36) ms616.51 ± (613.28 - 619.74) ms+5.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.59 ± (58.42 - 58.75) MB60.03 ± (59.91 - 60.15) MB+2.5%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.9%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms204.83 ± (204.19 - 205.46) ms220.52 ± (218.53 - 222.50) ms+7.7%✅⬆️
process.time_to_main_ms75.41 ± (75.12 - 75.71) ms81.73 ± (80.96 - 82.50) ms+8.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.22 - 16.26) MB16.19 ± (16.16 - 16.21) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (19 - 20)+0.9%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms205.14 ± (204.46 - 205.82) ms218.24 ± (216.48 - 220.00) ms+6.4%✅⬆️
process.time_to_main_ms76.82 ± (76.51 - 77.12) ms81.62 ± (80.94 - 82.30) ms+6.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.27 - 16.31) MB16.25 ± (16.23 - 16.27) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)21 ± (20 - 21)+1.2%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms567.35 ± (564.70 - 569.99) ms581.07 ± (575.38 - 586.77) ms+2.4%✅⬆️
process.time_to_main_ms570.70 ± (569.50 - 571.90) ms598.14 ± (595.67 - 600.62) ms+4.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.94 ± (61.90 - 61.97) MB62.01 ± (61.96 - 62.07) MB+0.1%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.4%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms202.87 ± (202.26 - 203.49) ms213.13 ± (211.49 - 214.77) ms+5.1%✅⬆️
process.time_to_main_ms74.81 ± (74.54 - 75.07) ms78.83 ± (78.13 - 79.52) ms+5.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.64 ± (11.63 - 11.66) MB11.51 ± (11.49 - 11.53) MB-1.2%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.7%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms202.43 ± (201.72 - 203.14) ms211.33 ± (209.81 - 212.85) ms+4.4%✅⬆️
process.time_to_main_ms75.69 ± (75.44 - 75.95) ms79.34 ± (78.71 - 79.98) ms+4.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.63 ± (11.62 - 11.65) MB11.60 ± (11.58 - 11.62) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.8%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms495.65 ± (491.23 - 500.07) ms556.97 ± (548.97 - 564.97) ms+12.4%✅⬆️
process.time_to_main_ms531.02 ± (529.46 - 532.59) ms557.47 ± (555.19 - 559.74) ms+5.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.66 ± (51.61 - 51.70) MB51.91 ± (51.83 - 51.99) MB+0.5%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.5%✅⬆️
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 (8584) - mean (73ms)  : 70, 75
    master - mean (75ms)  : 70, 80

    section Bailout
    This PR (8584) - mean (78ms)  : 75, 80
    master - mean (79ms)  : 75, 83

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (1,141ms)  : 1084, 1197
    master - mean (1,129ms)  : 1075, 1183

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 (8584) - mean (117ms)  : 111, 123
    master - mean (117ms)  : 110, 124

    section Bailout
    This PR (8584) - mean (121ms)  : 115, 126
    master - mean (115ms)  : 112, 118

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (815ms)  : 785, 846
    master - mean (808ms)  : 777, 839

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8584) - mean (103ms)  : 97, 108
    master - mean (104ms)  : 99, 109

    section Bailout
    This PR (8584) - mean (106ms)  : 101, 111
    master - mean (102ms)  : 98, 106

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (954ms)  : 911, 996
    master - mean (951ms)  : 910, 991

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

    section Bailout
    This PR (8584) - mean (104ms)  : 99, 110
    master - mean (104ms)  : 99, 109

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (840ms)  : 785, 896
    master - mean (834ms)  : 791, 876

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 (8584) - mean (217ms)  : 192, 242
    master - mean (204ms)  : 192, 217

    section Bailout
    This PR (8584) - mean (221ms)  : crit, 196, 247
    master - mean (208ms)  : 199, 217

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (1,357ms)  : crit, 1284, 1431
    master - mean (1,266ms)  : 1223, 1309

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 (8584) - mean (324ms)  : 271, 377
    master - mean (298ms)  : 282, 315

    section Bailout
    This PR (8584) - mean (323ms)  : crit, 280, 366
    master - mean (299ms)  : 283, 315

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (1,080ms)  : crit, 1029, 1131
    master - mean (1,010ms)  : 987, 1033

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8584) - mean (317ms)  : 272, 362
    master - mean (290ms)  : 276, 304

    section Bailout
    This PR (8584) - mean (317ms)  : crit, 271, 363
    master - mean (292ms)  : 277, 307

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (1,224ms)  : 1141, 1308
    master - mean (1,171ms)  : 1132, 1210

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8584) - mean (309ms)  : 266, 351
    master - mean (289ms)  : 274, 305

    section Bailout
    This PR (8584) - mean (304ms)  : 272, 337
    master - mean (289ms)  : 274, 305

    section CallTarget+Inlining+NGEN
    This PR (8584) - mean (1,152ms)  : crit, 1035, 1269
    master - mean (1,065ms)  : 988, 1141

Loading

@dudikeleti
dudikeleti merged commit b9b7af8 into master May 11, 2026
74 of 77 checks passed
@dudikeleti
dudikeleti deleted the dudik/fix-concurrent-adaptive-cache-getoradd-race branch May 11, 2026 10:30
@github-actions github-actions Bot added this to the vNext-v3 milestone May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants