Skip to content

Try to fix unit tests touching [TracerRestorer] - #8957

Merged
andrewlock merged 2 commits into
masterfrom
andrew/fix-unit-test-flake
Jul 30, 2026
Merged

Try to fix unit tests touching [TracerRestorer]#8957
andrewlock merged 2 commits into
masterfrom
andrew/fix-unit-test-flake

Conversation

@andrewlock

@andrewlock andrewlock commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary of changes

Try to fix the attributes in unit tests

Reason for change

  • The span enrichment ones should not have been marked with [TracerRestorer] as they don't access global state
  • The meter tests should have the collection attribute to avoid concurrent running but they don't actually need to replace the tracer AFAICT

Implementation details

Throw AI at it and tell it to fix the flake 😅

Test coverage

Ran locally, but this is the test

Other details

Possibly caused by

#incident-57303

@andrewlock andrewlock added the area:tests unit tests, integration tests label Jul 29, 2026
@andrewlock
andrewlock requested review from a team as code owners July 29, 2026 14:11
@andrewlock
andrewlock requested review from pavlokhrebto and typotter and removed request for a team July 29, 2026 14:11
@pr-commenter

pr-commenter Bot commented Jul 29, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-29 14:20:49

Comparing candidate commit 4a6d059 in PR branch andrew/fix-unit-test-flake with baseline commit 2302d41 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 63 known flaky benchmarks, 63 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.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 throughput [-30379.964op/s; -26756.854op/s] or [-8.557%; -7.536%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-7486.962op/s; -6980.534op/s] or [-8.547%; -7.969%]

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 [-9469.593op/s; -9051.290op/s] or [-11.228%; -10.732%]

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

  • 🟥 throughput [-9990.916op/s; -8421.303op/s] or [-10.159%; -8.563%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+302.744ms; +309.150ms] or [+150.232%; +153.411%]
  • 🟥 throughput [-46.930op/s; -43.174op/s] or [-8.444%; -7.768%]

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

  • 🟥 execution_time [+382.656ms; +384.538ms] or [+302.321%; +303.809%]
  • 🟩 throughput [+91.103op/s; +98.114op/s] or [+12.012%; +12.936%]

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

  • 🟥 execution_time [+391.005ms; +394.442ms] or [+346.025%; +349.066%]

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

  • 🟥 allocated_mem [+4.693KB; +4.694KB] or [+98.806%; +98.821%]
  • 🟥 throughput [-60288.845op/s; -59919.589op/s] or [-46.908%; -46.621%]

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

  • 🟥 allocated_mem [+3.816KB; +3.816KB] or [+80.699%; +80.711%]
  • 🟩 execution_time [-15.914ms; -11.731ms] or [-7.432%; -5.479%]
  • 🟥 throughput [-60012.749op/s; -57234.947op/s] or [-43.806%; -41.778%]

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

  • 🟥 allocated_mem [+4.544KB; +4.544KB] or [+98.261%; +98.274%]
  • 🟥 throughput [-48788.438op/s; -46534.380op/s] or [-44.110%; -42.072%]

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

  • 🟥 allocated_mem [+1.316KB; +1.316KB] or [+106.475%; +106.490%]
  • 🟥 throughput [-279942.389op/s; -276254.555op/s] or [-28.583%; -28.207%]

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

  • 🟥 allocated_mem [+479 bytes; +480 bytes] or [+39.212%; +39.221%]
  • 🟩 execution_time [-26.475ms; -21.568ms] or [-11.807%; -9.618%]
  • 🟥 throughput [-72520.347op/s; -49095.949op/s] or [-7.747%; -5.245%]

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

  • 🟥 allocated_mem [+1.280KB; +1.280KB] or [+105.947%; +105.963%]
  • 🟥 throughput [-161300.609op/s; -145103.128op/s] or [-23.176%; -20.849%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-72639.308op/s; -71859.967op/s] or [-48.885%; -48.361%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-73046.027op/s; -70163.126op/s] or [-46.478%; -44.644%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56353.694op/s; -53737.341op/s] or [-44.893%; -42.809%]

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

  • 🟩 throughput [+322008.263op/s; +339056.551op/s] or [+10.737%; +11.306%]

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

  • 🟩 execution_time [-19.154ms; -14.823ms] or [-8.829%; -6.833%]

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

  • 🟥 execution_time [+299.619ms; +300.343ms] or [+149.709%; +150.071%]

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

  • 🟥 execution_time [+299.529ms; +303.312ms] or [+151.053%; +152.961%]

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

  • 🟥 execution_time [+300.052ms; +303.446ms] or [+151.143%; +152.853%]

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

  • 🟥 execution_time [+295.546ms; +296.646ms] or [+145.161%; +145.701%]

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

  • 🟥 execution_time [+296.553ms; +300.834ms] or [+144.974%; +147.067%]

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

  • 🟥 execution_time [+301.435ms; +303.221ms] or [+150.657%; +151.549%]

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

  • 🟥 execution_time [+23.672µs; +47.289µs] or [+7.557%; +15.097%]
  • 🟥 throughput [-439.247op/s; -240.523op/s] or [-13.693%; -7.498%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.936ms; +300.806ms] or [+149.699%; +150.133%]

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

  • 🟥 execution_time [+423.772ms; +430.942ms] or [+460.446%; +468.236%]
  • 🟩 throughput [+725.334op/s; +915.631op/s] or [+5.960%; +7.524%]

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

  • 🟥 execution_time [+365.534ms; +370.475ms] or [+277.546%; +281.298%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+2.836KB; +2.841KB] or [+5.038%; +5.048%]
  • unstable execution_time [+251.376ms; +315.053ms] or [+115.580%; +144.858%]
  • 🟥 throughput [-505.698op/s; -470.872op/s] or [-45.821%; -42.666%]

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

  • unstable execution_time [+207.181ms; +340.426ms] or [+88.292%; +145.075%]
  • 🟥 throughput [-678.841op/s; -595.178op/s] or [-45.279%; -39.699%]

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

  • 🟥 execution_time [+340.237ms; +349.262ms] or [+203.502%; +208.899%]
  • 🟥 throughput [-412.006op/s; -370.943op/s] or [-28.687%; -25.828%]

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

  • 🟩 execution_time [-193.416µs; -167.557µs] or [-9.798%; -8.488%]
  • 🟩 throughput [+47.417op/s; +55.245op/s] or [+9.360%; +10.906%]

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

  • 🟥 execution_time [+300.416µs; +376.644µs] or [+7.618%; +9.551%]
  • 🟥 throughput [-21.805op/s; -17.847op/s] or [-8.598%; -7.038%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.526ms; +304.240ms] or [+152.346%; +153.209%]

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

  • 🟥 execution_time [+303.162ms; +306.718ms] or [+151.915%; +153.697%]

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

  • 🟥 execution_time [+302.106ms; +305.710ms] or [+151.765%; +153.576%]
  • 🟩 throughput [+25285.813op/s; +33339.972op/s] or [+5.326%; +7.023%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+299.325ms; +301.954ms] or [+150.311%; +151.631%]

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

  • 🟥 execution_time [+297.168ms; +299.088ms] or [+146.936%; +147.886%]

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

  • 🟥 execution_time [+302.178ms; +306.014ms] or [+153.157%; +155.101%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.480ms; +304.348ms] or [+151.316%; +152.755%]
  • 🟥 throughput [-25767.673op/s; -22947.975op/s] or [-6.685%; -5.953%]

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

  • 🟥 execution_time [+299.758ms; +319.135ms] or [+149.402%; +159.059%]
  • 🟩 throughput [+32189.266op/s; +48004.456op/s] or [+6.392%; +9.532%]

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

  • 🟥 execution_time [+301.009ms; +304.270ms] or [+149.749%; +151.372%]

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

  • 🟩 execution_time [-16.231ms; -12.571ms] or [-7.547%; -5.845%]
  • 🟩 throughput [+22245.380op/s; +29489.857op/s] or [+6.103%; +8.090%]

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

  • unstable execution_time [+17.476µs; +63.811µs] or [+4.317%; +15.762%]

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

  • 🟩 allocated_mem [-26.776KB; -26.752KB] or [-9.767%; -9.759%]
  • unstable execution_time [-27.609µs; +30.916µs] or [-5.457%; +6.110%]
  • unstable throughput [-108.978op/s; +92.639op/s] or [-5.438%; +4.623%]

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

  • unstable execution_time [-54.288µs; +6.975µs] or [-9.408%; +1.209%]

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

  • unstable execution_time [+9.982µs; +15.360µs] or [+23.595%; +36.307%]
  • 🟥 throughput [-6290.502op/s; -4259.359op/s] or [-26.481%; -17.931%]

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

  • unstable execution_time [-12.795µs; -4.571µs] or [-19.851%; -7.092%]
  • unstable throughput [+1098.815op/s; +2879.524op/s] or [+6.742%; +17.667%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.540ms; +302.132ms] or [+151.910%; +152.714%]

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

  • 🟥 execution_time [+301.809ms; +304.312ms] or [+153.620%; +154.894%]

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

  • 🟥 execution_time [+301.644ms; +305.082ms] or [+151.010%; +152.731%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-23490.314op/s; -21305.347op/s] or [-6.503%; -5.898%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.007ms; +301.197ms] or [+149.028%; +150.120%]

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

  • 🟥 execution_time [+302.669ms; +304.138ms] or [+151.986%; +152.723%]

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

  • 🟥 execution_time [+303.593ms; +306.292ms] or [+153.963%; +155.332%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.504ms; +300.288ms] or [+149.394%; +149.785%]
  • 🟩 throughput [+61169469.239op/s; +61456865.869op/s] or [+44.547%; +44.757%]

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

  • unstable execution_time [+346.623ms; +406.070ms] or [+431.088%; +505.021%]

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

  • 🟥 execution_time [+299.824ms; +300.918ms] or [+149.545%; +150.091%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • 🟥 throughput [-56111.362op/s; -53179.978op/s] or [-6.262%; -5.935%]

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

  • 🟩 throughput [+78014.941op/s; +86795.573op/s] or [+7.284%; +8.104%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • 🟥 throughput [-96940.088op/s; -92929.913op/s] or [-8.874%; -8.507%]

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

  • 🟩 throughput [+83720.518op/s; +92247.045op/s] or [+8.315%; +9.162%]

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

  • 🟩 throughput [+39140.015op/s; +46054.619op/s] or [+7.107%; +8.363%]

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

  • 🟩 throughput [+27491.761op/s; +37073.503op/s] or [+6.154%; +8.298%]

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

  • 🟩 throughput [+53692.577op/s; +75141.354op/s] or [+5.999%; +8.395%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • 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_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • 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_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • 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_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
  • 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.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • 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

@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.

👍

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8957) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration71.68 ± (71.73 - 72.16) ms73.51 ± (73.26 - 73.83) ms+2.6%✅⬆️
.NET Framework 4.8 - Bailout
duration78.42 ± (78.10 - 78.59) ms75.19 ± (75.09 - 75.43) ms-4.1%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1087.49 ± (1086.77 - 1093.07) ms1088.42 ± (1089.48 - 1097.11) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.38 ± (22.34 - 22.42) ms22.32 ± (22.28 - 22.35) ms-0.3%
process.time_to_main_ms84.10 ± (83.85 - 84.36) ms82.75 ± (82.53 - 82.97) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.98 ± (10.98 - 10.99) MB11.02 ± (11.01 - 11.02) MB+0.3%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.04 ± (22.02 - 22.07) ms22.17 ± (22.14 - 22.19) ms+0.6%✅⬆️
process.time_to_main_ms83.68 ± (83.47 - 83.88) ms82.60 ± (82.45 - 82.75) ms-1.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.03 ± (11.03 - 11.03) MB11.05 ± (11.04 - 11.05) MB+0.2%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms209.92 ± (209.02 - 210.82) ms212.22 ± (211.30 - 213.14) ms+1.1%✅⬆️
process.time_to_main_ms538.02 ± (536.78 - 539.25) ms541.29 ± (540.05 - 542.53) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.53 ± (49.50 - 49.56) MB49.52 ± (49.48 - 49.55) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms20.81 ± (20.78 - 20.84) ms20.89 ± (20.86 - 20.92) ms+0.4%✅⬆️
process.time_to_main_ms71.63 ± (71.46 - 71.80) ms71.26 ± (71.11 - 71.40) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.71 ± (10.71 - 10.71) MB10.73 ± (10.73 - 10.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.77 ± (20.74 - 20.80) ms20.77 ± (20.74 - 20.80) ms-0.0%
process.time_to_main_ms72.61 ± (72.48 - 72.74) ms72.25 ± (72.12 - 72.38) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.83 ± (10.83 - 10.84) MB10.86 ± (10.85 - 10.86) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms372.11 ± (369.95 - 374.27) ms371.92 ± (369.69 - 374.15) ms-0.1%
process.time_to_main_ms547.53 ± (546.34 - 548.72) ms546.21 ± (544.89 - 547.52) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.64 ± (50.62 - 50.66) MB50.67 ± (50.64 - 50.69) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.47 ± (19.42 - 19.52) ms19.40 ± (19.35 - 19.44) ms-0.4%
process.time_to_main_ms73.39 ± (73.14 - 73.63) ms73.33 ± (73.10 - 73.56) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.75 ± (7.74 - 7.75) MB7.79 ± (7.78 - 7.80) MB+0.5%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.18 ± (19.14 - 19.21) ms19.05 ± (19.02 - 19.07) ms-0.7%
process.time_to_main_ms72.38 ± (72.19 - 72.57) ms72.06 ± (71.90 - 72.22) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.80 ± (7.80 - 7.80) MB7.83 ± (7.82 - 7.84) MB+0.4%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms294.06 ± (292.12 - 296.01) ms295.54 ± (293.12 - 297.96) ms+0.5%✅⬆️
process.time_to_main_ms503.80 ± (502.44 - 505.15) ms495.37 ± (494.31 - 496.43) ms-1.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.01 ± (37.99 - 38.04) MB38.04 ± (38.01 - 38.07) MB+0.1%✅⬆️
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
duration204.99 ± (204.93 - 205.88) ms214.60 ± (214.82 - 215.97) ms+4.7%✅⬆️
.NET Framework 4.8 - Bailout
duration209.74 ± (209.44 - 210.44) ms220.50 ± (220.29 - 221.34) ms+5.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1238.61 ± (1237.15 - 1243.33) ms1294.98 ± (1293.59 - 1300.09) ms+4.6%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms196.67 ± (196.24 - 197.10) ms206.96 ± (206.54 - 207.38) ms+5.2%✅⬆️
process.time_to_main_ms86.31 ± (86.02 - 86.60) ms92.23 ± (91.89 - 92.58) ms+6.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.12 - 16.18) MB16.09 ± (16.07 - 16.11) MB-0.4%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+2.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms196.83 ± (196.36 - 197.29) ms205.67 ± (205.23 - 206.11) ms+4.5%✅⬆️
process.time_to_main_ms87.47 ± (87.24 - 87.70) ms93.06 ± (92.77 - 93.34) ms+6.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.12 - 16.17) MB16.14 ± (16.12 - 16.15) MB-0.1%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)+2.2%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms390.74 ± (389.32 - 392.16) ms405.97 ± (404.45 - 407.48) ms+3.9%✅⬆️
process.time_to_main_ms551.71 ± (550.51 - 552.92) ms573.10 ± (571.98 - 574.21) ms+3.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.97 ± (58.75 - 59.19) MB59.84 ± (59.77 - 59.90) MB+1.5%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+1.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms203.15 ± (202.78 - 203.52) ms211.53 ± (211.02 - 212.05) ms+4.1%✅⬆️
process.time_to_main_ms76.14 ± (75.92 - 76.36) ms80.48 ± (80.20 - 80.76) ms+5.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.55 ± (16.52 - 16.57) MB16.32 ± (16.30 - 16.35) MB-1.4%
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (19 - 20)+1.9%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms203.41 ± (203.07 - 203.76) ms211.24 ± (210.69 - 211.79) ms+3.8%✅⬆️
process.time_to_main_ms78.01 ± (77.83 - 78.19) ms82.11 ± (81.80 - 82.42) ms+5.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.53 ± (16.51 - 16.54) MB16.35 ± (16.33 - 16.38) MB-1.0%
runtime.dotnet.threads.count20 ± (20 - 20)21 ± (20 - 21)+1.7%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms584.38 ± (582.15 - 586.61) ms579.04 ± (576.85 - 581.23) ms-0.9%
process.time_to_main_ms562.58 ± (561.31 - 563.85) ms591.61 ± (590.40 - 592.82) ms+5.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.61 ± (61.52 - 61.70) MB61.61 ± (61.52 - 61.69) MB-0.0%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.4%
.NET 8 - Baseline
process.internal_duration_ms200.95 ± (200.57 - 201.33) ms212.37 ± (211.82 - 212.91) ms+5.7%✅⬆️
process.time_to_main_ms74.52 ± (74.22 - 74.82) ms80.31 ± (80.03 - 80.59) ms+7.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.84 ± (11.81 - 11.86) MB11.70 ± (11.67 - 11.73) MB-1.2%
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (19 - 19)+2.2%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms201.31 ± (200.89 - 201.72) ms212.00 ± (211.50 - 212.50) ms+5.3%✅⬆️
process.time_to_main_ms76.04 ± (75.85 - 76.23) ms81.58 ± (81.31 - 81.85) ms+7.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.85 ± (11.82 - 11.87) MB11.80 ± (11.77 - 11.82) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.8%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms511.03 ± (505.70 - 516.35) ms531.48 ± (524.33 - 538.63) ms+4.0%✅⬆️
process.time_to_main_ms514.59 ± (513.52 - 515.67) ms543.24 ± (542.15 - 544.32) ms+5.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.34 ± (51.28 - 51.40) MB51.61 ± (51.53 - 51.68) MB+0.5%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.8%✅⬆️
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 (8957) - mean (74ms)  : 69, 78
    master - mean (72ms)  : 69, 75

    section Bailout
    This PR (8957) - mean (75ms)  : 73, 77
    master - mean (78ms)  : 75, 82

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (1,093ms)  : 1037, 1149
    master - mean (1,090ms)  : 1044, 1135

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 (8957) - mean (112ms)  : 106, 118
    master - mean (114ms)  : 108, 120

    section Bailout
    This PR (8957) - mean (111ms)  : 109, 113
    master - mean (113ms)  : 108, 118

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (791ms)  : 763, 818
    master - mean (786ms)  : 766, 805

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

    section Bailout
    This PR (8957) - mean (99ms)  : 97, 101
    master - mean (99ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (953ms)  : 914, 991
    master - mean (949ms)  : 915, 982

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8957) - mean (100ms)  : 94, 106
    master - mean (101ms)  : 96, 106

    section Bailout
    This PR (8957) - mean (98ms)  : 95, 101
    master - mean (99ms)  : 95, 104

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (820ms)  : 782, 858
    master - mean (830ms)  : 787, 872

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 (8957) - mean (215ms)  : 207, 223
    master - mean (205ms)  : 200, 211

    section Bailout
    This PR (8957) - mean (221ms)  : 215, 227
    master - mean (210ms)  : 205, 215

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (1,297ms)  : 1251, 1343
    master - mean (1,240ms)  : 1194, 1286

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 (8957) - mean (310ms)  : 303, 317
    master - mean (293ms)  : 285, 301

    section Bailout
    This PR (8957) - mean (310ms)  : 304, 315
    master - mean (294ms)  : 288, 301

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (1,023ms)  : 999, 1047
    master - mean (984ms)  : 958, 1010

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8957) - mean (302ms)  : 295, 310
    master - mean (289ms)  : 284, 294

    section Bailout
    This PR (8957) - mean (303ms)  : 295, 312
    master - mean (291ms)  : 287, 296

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (1,212ms)  : 1163, 1260
    master - mean (1,180ms)  : 1144, 1216

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8957) - mean (304ms)  : 296, 311
    master - mean (286ms)  : 280, 291

    section Bailout
    This PR (8957) - mean (305ms)  : crit, 296, 314
    master - mean (288ms)  : 283, 293

    section CallTarget+Inlining+NGEN
    This PR (8957) - mean (1,130ms)  : crit, 1005, 1254
    master - mean (1,062ms)  : 989, 1135

Loading

@andrewlock
andrewlock merged commit c191c47 into master Jul 30, 2026
144 checks passed
@andrewlock
andrewlock deleted the andrew/fix-unit-test-flake branch July 30, 2026 09:08
@github-actions github-actions Bot added this to the vNext-v3 milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests unit tests, integration tests type:flake-fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants