Skip to content

[Test Optimization] Fix MSTest 4.4.0 discovery and native retries - #9192

Open
tonyredondo wants to merge 24 commits into
masterfrom
fix/mstest-4.4.0
Open

[Test Optimization] Fix MSTest 4.4.0 discovery and native retries#9192
tonyredondo wants to merge 24 commits into
masterfrom
fix/mstest-4.4.0

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary of changes

Restore MSTest 4.4.0 discovery counts and record each native retry attempt, assigning final_status only to the final span for each test. Preserve older MSTest cleanup paths and report cleanup failures before the suite closes. Builds on #9189, already in master.

Reason for change

MSTest 4.4 changed discovery and native retry execution. Its policy selects results before class cleanup, so Datadog retries must run while row inputs and the framework lifecycle remain available.

The compatibility review also found missing cleanup hooks in MSTest 2.0–2.2.7 and returned cleanup exceptions in 3.8–3.10. Cleanup errors could leave a suite marked as passed or be reported again after its span had closed.

Implementation details

  • Count discovered tests before filtering, including isolated .NET Framework AppDomains; preserve the 4.3.x discovery path.
  • Intercept retry policy completion, restoring row arguments and a fresh TestContext. MSTest creates and cleans up a fresh class instance for each retry.
  • Track each row/result by its position within the native attempt and carry that identity into Datadog retries. Duplicate names and arguments retain separate final outcomes and initial EFD decisions.
  • Separate execution completion from span closure in Test: finish coverage and callbacks once, retain the captured duration, then assign final retry tags and close the span under the same guard as shutdown. Selenium uses the execution-completion callback so RUM flushing still happens while the attempt context is active.
  • Register the existing TestOptimization.ShutdownAsync hook before agent discovery can initialize the tracer, so sessions finish before their writer closes.
  • Match legacy cleanup signatures, consume returned exceptions and record the suite failure before closure. Keep the runner fallback for open suites; use the existing closed-state flag to avoid late writes. Comments explain version boundaries and ordering; native registrations were regenerated.

Test coverage

  • Cleanup: 33 cases across 20 stable minor releases, 2.0.0–4.4.0; EndOfClass/EndOfAssembly where supported, returned exceptions, suite status and late-tag warnings.
  • Native retries: 86 VSTest/MTP cases covering custom policies, parameterized rows, fresh instances, initialization failures, final tags, history and interactions with Test Optimization policies. Eight regressions cover duplicate data rows and identical custom-executor results, with automatic retries enabled and disabled.
  • Discovery/shutdown: filtering, empty runs, EFD thresholds, isolated AppDomains and session delivery during explicit close, process exit and exception shutdown.
  • Default samples use MSTest 3.11.1 before .NET 8 and retain 4.0.1 on .NET 8+/Framework; explicit versions remain unchanged. New test classes use Area=CIVisibility to match the CI job routing.

The eight duplicate-row regressions failed against the previous production binaries: two independent rows produced only one final_status. With the correction, all eight regressions and the complete 86-case native retry suite pass locally without skips. All four managed tracer targets and the .NET 8 integration project compile without warnings or errors. The 28 relevant lifecycle/instrumentation unit tests pass, and the .NET Framework integration project cross-compiles successfully; its Windows runtime validation remains pending.

Earlier CI validation for f228ad7b30 (before the duplicate-row correction):

  • Azure build 208818 completed with all 605 jobs passing. The Alpine/ARM64 .NET 9 job passed on its second attempt after the first timed out during compilation.
  • Windows x86/.NET 8 CI Visibility passed 99 tests with 3 skips, including the previously failing MSTest scenarios; its runner tests passed all 9 cases.
  • GitLab/DDCI and GitHub Actions checks passed.

The duplicate-row correction still requires CI validation on Windows. The earlier results above do not validate this new change.

Other details

Temporary gzip capture code, configuration, tests and pipeline steps have been removed. The intermittent Windows x86/.NET 8 event-delivery failure did not recur in the completed run, but its cause remains unexplained; this PR does not claim a compression fix.

The microbenchmark report still flags a 6.2–6.6% throughput regression in HttpClientBenchmark.SendAsync on net472 against master 9d742a23. Its relationship to this change is unconfirmed. The separate execution-time benchmark report found no regressions.

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected

📄 View the full report (charts + all metrics) →

@pr-commenter

pr-commenter Bot commented Sep 7, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-10 10:30:30

Comparing candidate commit 31c3e4f in PR branch fix/mstest-4.4.0 with baseline commit b8ebe04 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 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.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-6020.427op/s; -5547.287op/s] or [-6.873%; -6.333%]

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 [-8817.740op/s; -8350.325op/s] or [-10.455%; -9.901%]

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

  • 🟥 throughput [-7273.174op/s; -5833.727op/s] or [-7.395%; -5.932%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.605KB; +1.605KB] or [+48.760%; +48.776%]
  • 🟥 execution_time [+309.882ms; +312.715ms] or [+153.774%; +155.180%]
  • 🟥 throughput [-58.696op/s; -54.424op/s] or [-10.561%; -9.792%]

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

  • 🟥 allocated_mem [+1.013KB; +1.013KB] or [+37.563%; +37.575%]
  • 🟥 execution_time [+375.663ms; +379.805ms] or [+296.797%; +300.070%]
  • 🟩 throughput [+71.269op/s; +74.313op/s] or [+9.397%; +9.798%]

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

  • 🟥 allocated_mem [+1.090KB; +1.090KB] or [+40.417%; +40.429%]
  • 🟥 execution_time [+397.213ms; +399.522ms] or [+351.518%; +353.562%]

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

  • 🟥 allocated_mem [+4.725KB; +4.725KB] or [+99.465%; +99.482%]
  • 🟥 throughput [-60401.301op/s; -60011.158op/s] or [-46.995%; -46.692%]

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

  • 🟥 allocated_mem [+3.848KB; +3.848KB] or [+81.379%; +81.391%]
  • 🟩 execution_time [-15.942ms; -11.746ms] or [-7.445%; -5.486%]
  • 🟥 throughput [-62303.050op/s; -59543.129op/s] or [-45.478%; -43.463%]

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

  • 🟥 allocated_mem [+4.576KB; +4.576KB] or [+98.954%; +98.966%]
  • 🟥 throughput [-49679.041op/s; -47436.310op/s] or [-44.916%; -42.888%]

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

  • 🟥 allocated_mem [+1.348KB; +1.348KB] or [+109.063%; +109.078%]
  • 🟥 throughput [-289557.746op/s; -286035.992op/s] or [-29.565%; -29.206%]

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

  • 🟥 allocated_mem [+511 bytes; +512 bytes] or [+41.822%; +41.834%]
  • 🟩 execution_time [-25.712ms; -20.854ms] or [-11.466%; -9.300%]
  • 🟥 throughput [-97390.027op/s; -74675.017op/s] or [-10.404%; -7.978%]

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

  • 🟥 allocated_mem [+1.312KB; +1.312KB] or [+108.600%; +108.616%]
  • 🟥 throughput [-183950.288op/s; -167387.269op/s] or [-26.430%; -24.050%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-72484.876op/s; -71722.694op/s] or [-48.781%; -48.269%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-75377.961op/s; -72473.854op/s] or [-47.962%; -46.114%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-55853.229op/s; -53237.775op/s] or [-44.494%; -42.411%]

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

  • 🟩 throughput [+225431.481op/s; +272315.794op/s] or [+7.517%; +9.080%]

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

  • 🟩 execution_time [-18.980ms; -14.650ms] or [-8.749%; -6.753%]

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

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+300.164ms; +300.956ms] or [+149.982%; +150.377%]
  • 🟩 throughput [+1002.093op/s; +1022.224op/s] or [+11.068%; +11.290%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+299.954ms; +309.219ms] or [+151.268%; +155.940%]
  • 🟩 throughput [+2104.887op/s; +2431.986op/s] or [+16.099%; +18.601%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.275ms; +302.679ms] or [+151.255%; +152.466%]
  • 🟩 throughput [+1784.436op/s; +1909.554op/s] or [+17.228%; +18.436%]

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

  • 🟥 execution_time [+295.930ms; +297.163ms] or [+145.349%; +145.954%]
  • 🟩 throughput [+579.225op/s; +590.858op/s] or [+15.355%; +15.664%]

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

  • 🟥 execution_time [+299.165ms; +301.345ms] or [+146.251%; +147.316%]
  • 🟩 throughput [+2799.849op/s; +2844.841op/s] or [+40.677%; +41.330%]

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

  • 🟥 execution_time [+301.374ms; +302.519ms] or [+150.626%; +151.198%]
  • 🟩 throughput [+1474.871op/s; +1516.723op/s] or [+29.275%; +30.106%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472

  • 🟩 execution_time [-146.694µs; -142.466µs] or [-30.118%; -29.250%]
  • 🟩 throughput [+853.002op/s; +881.905op/s] or [+41.545%; +42.953%]

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

  • 🟥 allocated_mem [+24.769KB; +24.770KB] or [+544.153%; +544.188%]
  • 🟩 execution_time [-134.957µs; -108.106µs] or [-30.952%; -24.794%]
  • 🟩 throughput [+818.442op/s; +944.306op/s] or [+35.583%; +41.055%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • 🟩 execution_time [-144.518µs; -122.474µs] or [-30.963%; -26.241%]
  • 🟩 throughput [+793.249op/s; +877.065op/s] or [+36.618%; +40.487%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472

  • 🟩 execution_time [-126.492µs; -122.288µs] or [-34.152%; -33.017%]
  • 🟩 throughput [+1342.477op/s; +1390.479op/s] or [+49.719%; +51.497%]

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

  • 🟩 execution_time [-98.906µs; -75.200µs] or [-31.576%; -24.008%]
  • 🟩 throughput [+1112.896op/s; +1318.423op/s] or [+34.692%; +41.099%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1

  • 🟩 execution_time [-138.322µs; -115.906µs] or [-37.840%; -31.707%]
  • 🟩 throughput [+1339.385op/s; +1477.696op/s] or [+48.065%; +53.029%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.184ms; +300.230ms] or [+149.324%; +149.845%]

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

  • unstable execution_time [+336.305ms; +396.081ms] or [+365.409%; +430.358%]

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

  • unstable execution_time [+298.619ms; +349.742ms] or [+226.739%; +265.556%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+283.075ms; +327.033ms] or [+130.155%; +150.366%]
  • 🟥 throughput [-510.307op/s; -474.093op/s] or [-46.239%; -42.957%]

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

  • unstable execution_time [+202.709ms; +335.951ms] or [+86.386%; +143.168%]
  • 🟥 throughput [-671.162op/s; -587.659op/s] or [-44.767%; -39.197%]

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

  • 🟥 execution_time [+328.724ms; +343.248ms] or [+196.615%; +205.302%]
  • 🟥 throughput [-391.134op/s; -355.738op/s] or [-27.234%; -24.770%]

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

  • 🟩 execution_time [-170.626µs; -141.199µs] or [-8.643%; -7.153%]
  • 🟩 throughput [+39.827op/s; +47.872op/s] or [+7.862%; +9.450%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.923ms; +305.723ms] or [+153.050%; +153.956%]

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

  • 🟥 execution_time [+301.991ms; +303.309ms] or [+151.328%; +151.989%]

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

  • 🟥 execution_time [+300.849ms; +304.524ms] or [+151.134%; +152.980%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+303.032ms; +304.720ms] or [+152.172%; +153.020%]

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

  • 🟥 execution_time [+296.052ms; +310.596ms] or [+146.385%; +153.576%]

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

  • 🟥 execution_time [+299.240ms; +303.353ms] or [+151.668%; +153.753%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.903ms; +304.430ms] or [+151.528%; +152.797%]

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

  • 🟥 execution_time [+296.629ms; +307.075ms] or [+147.842%; +153.049%]
  • 🟩 throughput [+35792.709op/s; +46580.403op/s] or [+7.107%; +9.249%]

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

  • 🟥 execution_time [+301.145ms; +303.684ms] or [+149.817%; +151.080%]

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

  • 🟩 execution_time [-16.108ms; -12.440ms] or [-7.490%; -5.785%]

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

  • unstable execution_time [+9.102µs; +53.581µs] or [+2.248%; +13.235%]

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

  • 🟩 allocated_mem [-19.964KB; -19.940KB] or [-7.282%; -7.273%]
  • unstable execution_time [-14.003µs; +44.378µs] or [-2.768%; +8.771%]
  • unstable throughput [-160.827op/s; +40.146op/s] or [-8.025%; +2.003%]

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

  • 🟩 allocated_mem [-17.227KB; -17.207KB] or [-6.280%; -6.273%]
  • unstable execution_time [-79.710µs; -18.303µs] or [-13.813%; -3.172%]

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

  • 🟥 execution_time [+5.230µs; +9.277µs] or [+12.362%; +21.927%]
  • 🟥 throughput [-4366.246op/s; -2578.155op/s] or [-18.381%; -10.853%]

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

  • unstable execution_time [-13.887µs; -5.475µs] or [-21.545%; -8.495%]
  • unstable throughput [+1446.749op/s; +3317.248op/s] or [+8.876%; +20.352%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.885ms; +303.720ms] or [+152.589%; +153.517%]

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

  • 🟥 execution_time [+301.941ms; +304.903ms] or [+153.687%; +155.195%]

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

  • 🟥 execution_time [+301.440ms; +305.187ms] or [+150.908%; +152.784%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+297.804ms; +300.330ms] or [+148.428%; +149.687%]

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

  • 🟥 execution_time [+301.507ms; +304.154ms] or [+151.402%; +152.731%]

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

  • 🟥 execution_time [+303.166ms; +305.379ms] or [+153.746%; +154.869%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.274ms; +300.516ms] or [+149.279%; +149.899%]
  • 🟩 throughput [+60939269.466op/s; +61383966.929op/s] or [+44.380%; +44.704%]

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

  • 🟥 execution_time [+417.365ms; +420.956ms] or [+519.067%; +523.534%]

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

  • 🟥 execution_time [+300.163ms; +301.481ms] or [+149.714%; +150.372%]
  • 🟩 throughput [+17675865.535op/s; +18691688.109op/s] or [+7.829%; +8.279%]

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

  • 🟩 throughput [+78878.583op/s; +89404.465op/s] or [+7.365%; +8.347%]

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

  • 🟩 throughput [+55568.391op/s; +68735.187op/s] or [+5.519%; +6.827%]

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

  • 🟩 throughput [+37919.939op/s; +42745.780op/s] or [+6.886%; +7.762%]

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

  • 🟩 throughput [+73484.389op/s; +91451.566op/s] or [+8.210%; +10.217%]

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.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 netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@tonyredondo tonyredondo changed the title [Test Optimization] Support MSTest 4.4.0 [Test Optimization] Fix MSTest 4.4.0 discovery and native retries Sep 7, 2026
@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected

📄 View the full report (charts + all metrics) →

@tonyredondo
tonyredondo marked this pull request as ready for review September 9, 2026 18:25
@tonyredondo
tonyredondo requested review from a team as code owners September 9, 2026 18:25
@tonyredondo
tonyredondo requested review from link04 and vandonr and removed request for a team September 9, 2026 18:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T18:37:39.395072Z f228ad7 Draft marked ready
🔒 Security Review Completed 2026-09-09T18:34:38.732491Z f228ad7 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: f228ad7b30

ℹ️ 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".

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.

2 participants