Skip to content

[Debugger] Treat Nullable<T> as safe for snapshot ToString#8568

Merged
dudikeleti merged 3 commits into
masterfrom
dudik/redaction-nullable-safe-tostring
May 11, 2026
Merged

[Debugger] Treat Nullable<T> as safe for snapshot ToString#8568
dudikeleti merged 3 commits into
masterfrom
dudik/redaction-nullable-safe-tostring

Conversation

@dudikeleti

@dudikeleti dudikeleti commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Redaction.IsSafeToCallToString now unwraps Nullable<T> before checking IsSimple/the allow-list of types that are safe to ToString.
  • Preserve the existing null-tolerant behavior of IsSafeToCallToString so expression dumping fallback paths can still pass a null Type.
  • Update SupportedTypesServiceTests to test Type values directly and cover int?, DateTime?, TimeSpan?, DateTimeOffset?.
  • Add snapshot and expression-dump regression coverage for nullable safe-to-ToString values and non-generic dictionary null values.

Reason for change

  • DateTime?/TimeSpan?/etc. were treated as complex objects, so snapshot serialization recursed into Nullable<T> internals instead of rendering the underlying value via ToString.
  • The previous test used boxed nullable values, which masks the issue because GetType() returns the underlying type rather than Nullable<T>.
  • IsSafeToCallToString is also used by expression dumping, where existing callers can pass a null Type for null dictionary values; that fallback behavior must be preserved.

Implementation details

  • Nullable.GetUnderlyingType is only called after a null check.
  • IsSupportedCollection(type) is still passed the original type so collection detection is unchanged.

Test coverage

  • Added unit tests in SupportedTypesServiceTests, DebuggerSnapshotCreatorTests, and DebuggerExpressionLanguageTests.

@dudikeleti
dudikeleti requested a review from a team as a code owner May 6, 2026 10:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b26e8866d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tracer/src/Datadog.Trace/Debugger/Snapshots/Redaction.cs
@dudikeleti
dudikeleti marked this pull request as draft May 6, 2026 10:31
@pr-commenter

pr-commenter Bot commented May 6, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-11 16:24:52

Comparing candidate commit f4a10bf in PR branch dudik/redaction-nullable-safe-tostring with baseline commit 4abf6b3 in branch master.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1

Found 5 performance improvements and 3 performance regressions! Performance is the same for 46 metrics, 18 unstable metrics, 89 known flaky benchmarks, 37 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 ----------------------------------'

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartRootSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_GetCurrentSpan net472

  • 🟩 throughput [+10209.569op/s; +12294.332op/s] or [+5.896%; +7.100%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_GetCurrentSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_SetActive net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-7.321%; -7.312%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 throughput [-75256.231op/s; -66753.045op/s] or [-51.123%; -45.346%]
  • 🟩 execution_time [-32.634ms; -15.405ms] or [-16.195%; -7.645%]

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

  • 🟥 throughput [-59309.005op/s; -45208.530op/s] or [-29.738%; -22.668%]
  • 🟩 execution_time [-74.616ms; -56.900ms] or [-37.736%; -28.776%]

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.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0

  • unstable execution_time [+12.690ms; +29.442ms] or [+10.248%; +23.778%]
  • unstable throughput [-42447.945op/s; -17856.853op/s] or [-19.538%; -8.219%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [-24.710ms; -7.522ms] or [-17.238%; -5.248%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [+10.573ms; +34.742ms] or [+11.890%; +39.069%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-64.154ms; -27.189ms] or [-35.649%; -15.108%]
  • unstable throughput [+26228.529op/s; +56696.958op/s] or [+18.987%; +41.044%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-22244.909µs; +20403.773µs] or [-16.513%; +15.147%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [-1.735ms; +23.099ms] or [-1.151%; +15.319%]
  • unstable throughput [-12779.249op/s; +2998.825op/s] or [-9.742%; +2.286%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [-17256.190µs; +17971.274µs] or [-15.133%; +15.761%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [-43.565ms; -23.997ms] or [-27.992%; -15.419%]
  • 🟩 throughput [+16198.650op/s; +32791.327op/s] or [+9.250%; +18.726%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [+1.088ms; +40.503ms] or [+0.976%; +36.356%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-22.427ms; -3.782ms] or [-15.878%; -2.678%]
  • unstable throughput [+37684.302op/s; +68273.317op/s] or [+21.216%; +38.437%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-29.893ms; -6.181ms] or [-26.917%; -5.566%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]
  • unstable execution_time [+41.778ms; +72.242ms] or [+31.880%; +55.127%]
  • unstable throughput [-38733.102op/s; -17420.321op/s] or [-22.548%; -10.141%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472

  • 🟩 throughput [+7843.744op/s; +10532.411op/s] or [+5.114%; +6.867%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+8.332%; +8.340%]
  • unstable throughput [+6553.722op/s; +27435.298op/s] or [+4.385%; +18.358%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-33.348ms; -6.613ms] or [-30.543%; -6.056%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+5.487%; +5.496%]
  • unstable execution_time [+5.617ms; +35.274ms] or [+3.842%; +24.124%]
  • unstable throughput [-18986.952op/s; +1599.978op/s] or [-19.137%; +1.613%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [-1.452ms; +40.957ms] or [-0.811%; +22.877%]
  • unstable throughput [-18816.168op/s; +1135.183op/s] or [-17.969%; +1.084%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [-60.303ms; -30.320ms] or [-44.277%; -22.262%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [+46.724ms; +77.583ms] or [+38.313%; +63.618%]
  • unstable throughput [-57428.800op/s; -37368.668op/s] or [-35.002%; -22.776%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [+8.887ms; +33.690ms] or [+10.103%; +38.300%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [-31.879ms; +3.819ms] or [-20.662%; +2.475%]
  • unstable throughput [-3346.815op/s; +22428.243op/s] or [-2.159%; +14.467%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-13.974ms; +20.844ms] or [-12.770%; +19.049%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-9085.005op/s; -8178.539op/s] or [-10.772%; -9.697%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • unstable execution_time [-82.132ms; -60.048ms] or [-40.976%; -29.958%]
  • unstable throughput [-34688.675op/s; -21638.796op/s] or [-29.157%; -18.188%]

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

  • unstable execution_time [-31.019ms; -7.631ms] or [-15.602%; -3.838%]
  • 🟥 throughput [-6741.809op/s; -5484.945op/s] or [-6.855%; -5.577%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+315.781ms; +331.498ms] or [+156.702%; +164.501%]
  • 🟥 throughput [-55.283op/s; -42.953op/s] or [-9.946%; -7.728%]

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

  • unstable execution_time [+107.274ms; +126.407ms] or [+84.753%; +99.869%]

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

  • unstable execution_time [+90.622ms; +104.125ms] or [+80.197%; +92.147%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+9.299%; +9.310%]
  • unstable execution_time [-59.557ms; -35.152ms] or [-27.815%; -16.417%]
  • unstable throughput [-24853.351op/s; -8761.622op/s] or [-18.142%; -6.395%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-47.590ms; -26.610ms] or [-22.662%; -12.671%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-263406.134op/s; -255369.766op/s] or [-26.895%; -26.075%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-85.649ms; -54.360ms] or [-38.196%; -24.242%]
  • unstable throughput [-268937.528op/s; -137724.180op/s] or [-28.731%; -14.713%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟩 execution_time [-91.812ms; -87.455ms] or [-45.829%; -43.654%]
  • 🟥 throughput [-125209.115op/s; -108517.246op/s] or [-17.990%; -15.592%]

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

  • 🟥 throughput [-37851.097op/s; -24862.994op/s] or [-24.084%; -15.820%]

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

  • unstable execution_time [-34.007ms; -14.247ms] or [-17.338%; -7.264%]
  • 🟩 throughput [+10559.523op/s; +13250.698op/s] or [+8.412%; +10.556%]

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

  • unstable throughput [-479751.558op/s; -125551.239op/s] or [-15.997%; -4.186%]

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

  • unstable execution_time [-66.000ms; -41.030ms] or [-30.424%; -18.913%]
  • 🟩 throughput [+178454.830op/s; +233665.237op/s] or [+7.083%; +9.275%]

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

  • 🟥 execution_time [+301.799ms; +316.552ms] or [+150.799%; +158.170%]

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

  • 🟥 execution_time [+130.782ms; +138.167ms] or [+65.953%; +69.678%]

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

  • unstable execution_time [+251.202ms; +289.130ms] or [+126.536%; +145.641%]

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

  • 🟥 execution_time [+297.239ms; +310.782ms] or [+145.992%; +152.644%]

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

  • 🟥 execution_time [+241.381ms; +257.726ms] or [+118.002%; +125.993%]

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

  • 🟥 execution_time [+266.635ms; +281.122ms] or [+133.264%; +140.505%]

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

  • 🟥 execution_time [+21.026µs; +44.651µs] or [+6.713%; +14.255%]
  • 🟥 throughput [-417.364op/s; -218.540op/s] or [-13.010%; -6.813%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.751ms; +300.937ms] or [+149.606%; +150.199%]

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

  • unstable execution_time [+356.283ms; +369.464ms] or [+387.117%; +401.438%]
  • 🟥 throughput [-7001.973op/s; -6846.909op/s] or [-57.536%; -56.262%]

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

  • unstable execution_time [+291.845ms; +343.271ms] or [+221.595%; +260.642%]
  • 🟥 throughput [-1244.615op/s; -1017.169op/s] or [-12.049%; -9.847%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+297.813ms; +311.942ms] or [+136.932%; +143.428%]
  • 🟥 throughput [-682.235op/s; -665.627op/s] or [-61.817%; -60.312%]

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

  • unstable execution_time [-51.246ms; +82.614ms] or [-21.839%; +35.207%]
  • 🟥 throughput [-707.751op/s; -616.169op/s] or [-47.207%; -41.099%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+347.994ms; +355.986ms] or [+208.141%; +212.921%]
  • 🟥 throughput [-725.789op/s; -691.489op/s] or [-50.536%; -48.147%]

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

  • 🟩 throughput [+17.810op/s; +19.269op/s] or [+5.120%; +5.539%]

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

  • 🟩 execution_time [-223.162µs; -205.594µs] or [-5.659%; -5.214%]
  • 🟩 throughput [+13.968op/s; +15.226op/s] or [+5.508%; +6.004%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+304.140ms; +316.817ms] or [+153.159%; +159.543%]

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

  • 🟥 execution_time [+259.405ms; +274.396ms] or [+129.988%; +137.500%]

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

  • 🟥 execution_time [+302.400ms; +308.912ms] or [+151.913%; +155.184%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+305.385ms; +319.186ms] or [+153.354%; +160.284%]

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

  • unstable execution_time [+226.303ms; +249.036ms] or [+111.897%; +123.137%]

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

  • 🟥 execution_time [+300.844ms; +307.600ms] or [+152.481%; +155.905%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+305.380ms; +319.692ms] or [+153.273%; +160.457%]

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

  • 🟥 execution_time [+305.114ms; +312.735ms] or [+152.072%; +155.870%]
  • 🟩 throughput [+30665.087op/s; +41467.457op/s] or [+6.089%; +8.234%]

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

  • 🟥 execution_time [+301.696ms; +307.831ms] or [+150.091%; +153.143%]

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

  • unstable execution_time [-79.684ms; -42.245ms] or [-37.053%; -19.644%]
  • unstable throughput [-117925.459op/s; -65246.733op/s] or [-32.350%; -17.899%]

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

  • unstable execution_time [-71.495ms; -43.696ms] or [-35.863%; -21.919%]

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

  • 🟩 allocated_mem [-20.256KB; -20.234KB] or [-7.389%; -7.381%]
  • unstable execution_time [-84.830µs; -30.799µs] or [-16.766%; -6.087%]
  • 🟩 throughput [+149.748op/s; +346.250op/s] or [+7.472%; +17.278%]

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

  • 🟩 allocated_mem [-14.895KB; -14.877KB] or [-5.430%; -5.423%]
  • 🟩 execution_time [-89.347µs; -33.838µs] or [-15.483%; -5.864%]
  • 🟩 throughput [+122.205op/s; +273.687op/s] or [+6.982%; +15.636%]

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

  • unstable execution_time [+2.166µs; +6.937µs] or [+5.120%; +16.396%]

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

  • unstable execution_time [-13.824µs; -4.562µs] or [-21.447%; -7.078%]
  • unstable throughput [+1378.827op/s; +3342.953op/s] or [+8.460%; +20.510%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.817ms; +316.923ms] or [+153.061%; +160.190%]

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

  • 🟥 execution_time [+303.063ms; +307.256ms] or [+154.258%; +156.392%]

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

  • 🟥 execution_time [+301.554ms; +306.510ms] or [+150.965%; +153.446%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-25402.519op/s; -18369.925op/s] or [-7.032%; -5.085%]

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

  • unstable execution_time [-73.730ms; -46.499ms] or [-36.854%; -23.243%]
  • unstable throughput [-124182.924op/s; -64771.808op/s] or [-23.505%; -12.260%]

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

  • unstable execution_time [-30.540ms; -6.487ms] or [-15.481%; -3.288%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.816ms; +313.444ms] or [+149.930%; +156.223%]

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

  • 🟥 execution_time [+306.548ms; +312.469ms] or [+153.934%; +156.907%]

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

  • 🟥 execution_time [+306.709ms; +311.952ms] or [+155.543%; +158.202%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.733ms; +301.478ms] or [+150.007%; +150.379%]
  • 🟩 throughput [+59818068.992op/s; +60111362.932op/s] or [+43.563%; +43.777%]

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

  • unstable execution_time [+360.017ms; +371.252ms] or [+447.745%; +461.717%]
  • 🟥 throughput [-7393.671op/s; -7185.766op/s] or [-57.157%; -55.550%]

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

  • 🟥 execution_time [+302.270ms; +304.666ms] or [+150.765%; +151.960%]
  • 🟥 throughput [-30302067.987op/s; -29039117.901op/s] or [-13.422%; -12.862%]

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

  • unstable execution_time [-71.941ms; -45.725ms] or [-35.236%; -22.395%]
  • unstable throughput [-236801.864op/s; -84535.823op/s] or [-22.109%; -7.893%]

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

  • unstable execution_time [-72.757ms; -46.576ms] or [-36.816%; -23.568%]

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

  • unstable execution_time [-63.927ms; -38.255ms] or [-33.306%; -19.931%]
  • unstable throughput [-258390.195op/s; -84404.955op/s] or [-20.000%; -6.533%]

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

  • unstable execution_time [-93.512ms; -70.798ms] or [-45.944%; -34.784%]
  • 🟩 throughput [+79316.320op/s; +92136.545op/s] or [+7.877%; +9.151%]

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

  • unstable execution_time [-74.777ms; -49.344ms] or [-37.343%; -24.642%]
  • unstable throughput [-35421.012op/s; +28658.237op/s] or [-6.432%; +5.204%]

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

  • unstable execution_time [-68.220ms; -42.228ms] or [-34.277%; -21.217%]

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

  • unstable execution_time [-91.020ms; -54.536ms] or [-45.526%; -27.278%]
  • unstable throughput [-129123.119op/s; +7255.573op/s] or [-14.426%; +0.811%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • unstable execution_time [-54.945ms; -26.056ms] or [-27.906%; -13.234%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • 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.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 net6.0
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

@dudikeleti
dudikeleti force-pushed the dudik/redaction-nullable-safe-tostring branch from 3b26e88 to 5211ced Compare May 6, 2026 14:33
@dudikeleti dudikeleti changed the title [Debugger] Treat Nullable<T> as safe to ToString in snapshots [Debugger] Treat Nullable<T> as safe for snapshot ToString May 6, 2026
@dudikeleti
dudikeleti marked this pull request as ready for review May 6, 2026 14:58
@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8568) 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
duration73.45 ± (73.29 - 73.69) ms73.03 ± (73.05 - 73.41) ms-0.6%
.NET Framework 4.8 - Bailout
duration79.47 ± (79.58 - 80.22) ms80.34 ± (80.05 - 80.60) ms+1.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1080.55 ± (1084.11 - 1093.96) ms1083.39 ± (1081.96 - 1088.65) ms+0.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.76 ± (22.69 - 22.83) ms23.05 ± (22.97 - 23.13) ms+1.3%✅⬆️
process.time_to_main_ms84.96 ± (84.65 - 85.26) ms88.62 ± (88.27 - 88.98) ms+4.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.83 ± (10.82 - 10.83) MB10.93 ± (10.92 - 10.93) MB+0.9%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.02 ± (22.97 - 23.07) ms22.68 ± (22.62 - 22.74) ms-1.5%
process.time_to_main_ms88.36 ± (88.02 - 88.70) ms88.75 ± (88.38 - 89.11) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.92) MB10.95 ± (10.95 - 10.96) MB+0.3%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms214.50 ± (213.63 - 215.37) ms215.13 ± (214.20 - 216.07) ms+0.3%✅⬆️
process.time_to_main_ms531.51 ± (529.93 - 533.08) ms529.56 ± (528.12 - 531.00) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.97 ± (47.94 - 48.00) MB48.03 ± (48.00 - 48.05) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.36 ± (21.30 - 21.41) ms21.58 ± (21.52 - 21.65) ms+1.0%✅⬆️
process.time_to_main_ms74.42 ± (74.12 - 74.73) ms76.42 ± (76.09 - 76.74) ms+2.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.61) MB10.62 ± (10.62 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.17 ± (21.12 - 21.21) ms21.11 ± (21.07 - 21.14) ms-0.3%
process.time_to_main_ms73.95 ± (73.78 - 74.13) ms74.56 ± (74.40 - 74.72) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.73 - 10.73) MB10.74 ± (10.74 - 10.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms384.26 ± (382.37 - 386.16) ms381.69 ± (379.61 - 383.77) ms-0.7%
process.time_to_main_ms532.21 ± (530.86 - 533.55) ms536.81 ± (535.34 - 538.28) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.35 ± (49.32 - 49.38) MB49.58 ± (49.55 - 49.60) MB+0.5%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.88 ± (19.83 - 19.94) ms19.68 ± (19.63 - 19.74) ms-1.0%
process.time_to_main_ms74.87 ± (74.59 - 75.14) ms74.20 ± (73.94 - 74.45) ms-0.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.65 - 7.66) MB7.67 ± (7.66 - 7.68) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.75 ± (19.70 - 19.80) ms19.96 ± (19.90 - 20.02) ms+1.1%✅⬆️
process.time_to_main_ms76.11 ± (75.83 - 76.39) ms77.53 ± (77.25 - 77.81) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.69 - 7.71) MB7.71 ± (7.71 - 7.72) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms297.77 ± (295.73 - 299.81) ms301.07 ± (299.04 - 303.10) ms+1.1%✅⬆️
process.time_to_main_ms493.95 ± (492.66 - 495.23) ms491.14 ± (490.00 - 492.28) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.64 ± (36.61 - 36.66) MB36.62 ± (36.59 - 36.65) 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
duration209.98 ± (211.57 - 214.43) ms210.03 ± (211.16 - 213.57) ms+0.0%✅⬆️
.NET Framework 4.8 - Bailout
duration215.70 ± (216.99 - 219.71) ms215.45 ± (216.48 - 218.90) ms-0.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1286.90 ± (1284.10 - 1293.44) ms1270.39 ± (1272.13 - 1281.01) ms-1.3%
.NET Core 3.1 - Baseline
process.internal_duration_ms207.43 ± (206.15 - 208.72) ms207.26 ± (206.10 - 208.42) ms-0.1%
process.time_to_main_ms90.57 ± (89.88 - 91.26) ms90.42 ± (89.86 - 90.97) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.90 ± (15.88 - 15.92) MB15.85 ± (15.83 - 15.87) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.0%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms207.65 ± (206.23 - 209.06) ms206.06 ± (205.03 - 207.09) ms-0.8%
process.time_to_main_ms91.14 ± (90.63 - 91.66) ms91.49 ± (90.99 - 92.00) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.95 ± (15.93 - 15.97) MB15.88 ± (15.86 - 15.90) MB-0.4%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms403.85 ± (401.43 - 406.26) ms406.49 ± (404.76 - 408.22) ms+0.7%✅⬆️
process.time_to_main_ms577.20 ± (573.67 - 580.73) ms568.73 ± (566.51 - 570.96) ms-1.5%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.46 ± (58.35 - 58.57) MB58.66 ± (58.61 - 58.71) MB+0.3%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.4%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms210.62 ± (208.90 - 212.33) ms211.47 ± (210.43 - 212.51) ms+0.4%✅⬆️
process.time_to_main_ms77.72 ± (77.09 - 78.34) ms78.85 ± (78.36 - 79.33) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.25 ± (16.22 - 16.27) MB16.24 ± (16.22 - 16.26) MB-0.0%
runtime.dotnet.threads.count20 ± (19 - 20)19 ± (19 - 20)-0.1%
.NET 6 - Bailout
process.internal_duration_ms212.34 ± (210.51 - 214.16) ms210.31 ± (209.14 - 211.47) ms-1.0%
process.time_to_main_ms79.43 ± (78.74 - 80.13) ms79.20 ± (78.76 - 79.64) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.23 ± (16.21 - 16.26) MB16.34 ± (16.32 - 16.36) MB+0.7%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)+0.0%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms610.59 ± (603.61 - 617.57) ms598.63 ± (595.36 - 601.90) ms-2.0%
process.time_to_main_ms565.04 ± (561.75 - 568.34) ms558.59 ± (556.59 - 560.59) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.88 ± (60.77 - 60.99) MB61.16 ± (61.06 - 61.26) MB+0.5%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms214.74 ± (212.39 - 217.09) ms207.66 ± (206.38 - 208.94) ms-3.3%
process.time_to_main_ms78.46 ± (77.69 - 79.24) ms76.76 ± (76.27 - 77.25) ms-2.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.44 ± (11.42 - 11.47) MB11.52 ± (11.50 - 11.54) MB+0.7%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.1%
.NET 8 - Bailout
process.internal_duration_ms215.77 ± (213.53 - 218.01) ms205.67 ± (204.59 - 206.74) ms-4.7%
process.time_to_main_ms81.11 ± (80.37 - 81.84) ms77.27 ± (76.90 - 77.65) ms-4.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.53 ± (11.50 - 11.55) MB11.58 ± (11.57 - 11.60) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.3%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms566.52 ± (557.27 - 575.77) ms540.92 ± (533.50 - 548.35) ms-4.5%
process.time_to_main_ms528.54 ± (524.64 - 532.43) ms513.03 ± (510.98 - 515.09) ms-2.9%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.84 ± (50.75 - 50.93) MB50.58 ± (50.50 - 50.66) MB-0.5%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.3%
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 (8568) - mean (73ms)  : 71, 76
    master - mean (73ms)  : 71, 76

    section Bailout
    This PR (8568) - mean (80ms)  : 76, 84
    master - mean (80ms)  : 75, 85

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (1,085ms)  : 1037, 1134
    master - mean (1,089ms)  : 1014, 1164

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 (8568) - mean (119ms)  : 112, 127
    master - mean (115ms)  : 110, 120

    section Bailout
    This PR (8568) - mean (119ms)  : 111, 127
    master - mean (119ms)  : 113, 124

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (781ms)  : 753, 809
    master - mean (784ms)  : 762, 805

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

    section Bailout
    This PR (8568) - mean (102ms)  : 98, 105
    master - mean (101ms)  : 98, 104

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (946ms)  : 907, 985
    master - mean (944ms)  : 912, 977

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

    section Bailout
    This PR (8568) - mean (106ms)  : 100, 111
    master - mean (104ms)  : 99, 109

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (822ms)  : 790, 854
    master - mean (824ms)  : 787, 861

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 (8568) - mean (212ms)  : 195, 230
    master - mean (213ms)  : 193, 233

    section Bailout
    This PR (8568) - mean (218ms)  : 200, 235
    master - mean (218ms)  : 199, 238

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (1,277ms)  : 1213, 1340
    master - mean (1,289ms)  : 1221, 1356

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 (8568) - mean (314ms)  : 279, 348
    master - mean (311ms)  : 278, 344

    section Bailout
    This PR (8568) - mean (310ms)  : 283, 336
    master - mean (317ms)  : 275, 359

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (1,024ms)  : 983, 1065
    master - mean (1,033ms)  : 983, 1084

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8568) - mean (305ms)  : 273, 337
    master - mean (307ms)  : 255, 358

    section Bailout
    This PR (8568) - mean (300ms)  : 275, 324
    master - mean (305ms)  : 264, 346

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (1,193ms)  : 1135, 1251
    master - mean (1,217ms)  : 1128, 1305

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8568) - mean (299ms)  : 268, 331
    master - mean (306ms)  : 262, 351

    section Bailout
    This PR (8568) - mean (298ms)  : 268, 329
    master - mean (312ms)  : 264, 360

    section CallTarget+Inlining+NGEN
    This PR (8568) - mean (1,101ms)  : 977, 1224
    master - mean (1,135ms)  : 986, 1284

Loading

@dudikeleti
dudikeleti force-pushed the dudik/redaction-nullable-safe-tostring branch from 7a64cb7 to d7fa866 Compare May 11, 2026 12:11
dudikeleti and others added 3 commits May 11, 2026 17:12
When serializing a snapshot, IsSafeToCallToString unwraps Nullable<T> before
checking IsSimple/the allow-list. Without this, fields typed as e.g. DateTime?,
TimeSpan?, DateTimeOffset?, int? etc. are treated as complex objects and the
serializer recurses into their internal fields ('hasValue', 'value') instead of
rendering the underlying value via ToString.

Update SupportedTypesServiceTests to test types directly (so the test reflects
what the runtime sees in IsSafeToCallToString) and add cases for the common
Nullable<T> shapes. Add a snapshot-level test in DebuggerSnapshotCreatorTests
that asserts a holder with DateTime? and TimeSpan? fields renders as a flat
value with no recursion into fields.

Co-authored-by: Cursor <[email protected]>
@dudikeleti
dudikeleti force-pushed the dudik/redaction-nullable-safe-tostring branch from d7fa866 to f4a10bf Compare May 11, 2026 15:26
@dudikeleti
dudikeleti enabled auto-merge (squash) May 11, 2026 15:45
@dudikeleti
dudikeleti merged commit 0f0a34a into master May 11, 2026
139 of 140 checks passed
@dudikeleti
dudikeleti deleted the dudik/redaction-nullable-safe-tostring branch May 11, 2026 17:12
@github-actions github-actions Bot added this to the vNext-v3 milestone May 11, 2026
@andrewlock andrewlock added the type:enhancement Improvement to an existing feature label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:debugger type:enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants