[Test Optimization] ci: client caching + feature tweaks#8073
[Test Optimization] ci: client caching + feature tweaks#8073tonyredondo merged 2 commits intomasterfrom
Conversation
BenchmarksBenchmark execution time: 2026-02-03 12:19:09 Comparing candidate commit 5eec120 in PR branch Found 7 performance improvements and 9 performance regressions! Performance is the same for 161 metrics, 15 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0
scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0
scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0
scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0
|
This comment has been minimized.
This comment has been minimized.
50fc18c to
2018124
Compare
11d2f07 to
aeb7574
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8073) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8073) - mean (74ms) : 71, 76
master - mean (72ms) : 70, 75
section Bailout
This PR (8073) - mean (77ms) : 76, 79
master - mean (77ms) : 75, 79
section CallTarget+Inlining+NGEN
This PR (8073) - mean (1,065ms) : 1019, 1111
master - mean (1,056ms) : 1009, 1104
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 (8073) - mean (118ms) : 114, 122
master - mean (115ms) : 110, 120
section Bailout
This PR (8073) - mean (119ms) : 116, 123
master - mean (116ms) : 114, 118
section CallTarget+Inlining+NGEN
This PR (8073) - mean (780ms) : 721, 840
master - mean (786ms) : 729, 843
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8073) - mean (105ms) : 101, 109
master - mean (102ms) : 98, 106
section Bailout
This PR (8073) - mean (104ms) : 100, 107
master - mean (102ms) : 99, 105
section CallTarget+Inlining+NGEN
This PR (8073) - mean (748ms) : 675, 822
master - mean (748ms) : 687, 809
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8073) - mean (102ms) : 99, 105
master - mean (99ms) : 96, 103
section Bailout
This PR (8073) - mean (103ms) : 101, 105
master - mean (101ms) : 98, 103
section CallTarget+Inlining+NGEN
This PR (8073) - mean (695ms) : 674, 716
master - mean (675ms) : 656, 694
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 (8073) - mean (198ms) : 193, 203
master - mean (197ms) : 192, 201
section Bailout
This PR (8073) - mean (202ms) : 197, 206
master - mean (201ms) : 196, 206
section CallTarget+Inlining+NGEN
This PR (8073) - mean (1,166ms) : 1116, 1217
master - mean (1,157ms) : 1112, 1202
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 (8073) - mean (284ms) : 277, 290
master - mean (285ms) : 279, 292
section Bailout
This PR (8073) - mean (284ms) : 279, 289
master - mean (284ms) : 278, 289
section CallTarget+Inlining+NGEN
This PR (8073) - mean (954ms) : 891, 1017
master - mean (964ms) : 920, 1008
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8073) - mean (280ms) : 269, 291
master - mean (277ms) : 270, 284
section Bailout
This PR (8073) - mean (280ms) : 272, 288
master - mean (276ms) : 270, 281
section CallTarget+Inlining+NGEN
This PR (8073) - mean (951ms) : 898, 1005
master - mean (953ms) : 900, 1005
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8073) - mean (277ms) : 271, 283
master - mean (275ms) : 268, 283
section Bailout
This PR (8073) - mean (280ms) : 271, 288
master - mean (275ms) : 269, 281
section CallTarget+Inlining+NGEN
This PR (8073) - mean (859ms) : 827, 890
master - mean (853ms) : 827, 878
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
b98a4d3 to
e77015c
Compare
aeb7574 to
016b2b1
Compare
e77015c to
8fae54a
Compare
016b2b1 to
2e0e878
Compare
8fae54a to
33077cb
Compare
2ee26aa to
a5a26dc
Compare
07b09e0 to
566cf1c
Compare
ab1efa1 to
61e1498
Compare
566cf1c to
87c7fd2
Compare
61e1498 to
9bc0188
Compare
87c7fd2 to
2f8135c
Compare
8ce882a to
bf4132b
Compare
eee4289 to
882dbe0
Compare
bf4132b to
9ced60f
Compare
| Log.Information("TestOptimizationDynamicInstrumentationFeature: Dynamic instrumentation has been changed to {Value} by the settings api.", clientSettingsResponse.DynamicInstrumentationEnabled.Value); | ||
| settings.SetFlakyRetryEnabled(clientSettingsResponse.DynamicInstrumentationEnabled.Value); | ||
| Log.Information("TestOptimizationDynamicInstrumentationFeature: Dynamic instrumentation has been changed to {Value} by the settings api.", clientSettingsResponse.DynamicInstrumentationEnabled); | ||
| settings.SetDynamicInstrumentationEnabled(clientSettingsResponse.DynamicInstrumentationEnabled.Value); |
There was a problem hiding this comment.
Just checking to make sure that this was expected to swap from SetFlakyRetryEnabled to SetDynamicInstrumentationEnabled
Based on how SetFlakyRetryEnabled is set below it looks fine just wanted to call out
## Summary of changes - Add FixedSizeArrayPool and logger overloads to reduce per-log allocations. - Add RefStopwatch/StopwatchHelpers/CodeDuration and apply timing to TraceClock/TracerManagerFactory/Instrumentation and CI processors. - Lower init logs to Debug for CI protocol writer/sender and processors. ## Reason for change Reduce allocations and improve timing diagnostics in hot paths. ## Implementation details - New utility helpers in `Datadog.Trace.Util` for allocation-free timing and pooling. - Logging changes to avoid params array allocations in common log paths. - Timing/log-level tweaks in CI protocol writer/sender and trace processors. ## Test coverage CI passes then all changes are good. ## Other details - Stacked PRs (current marked): - **CURRENT**: PR1 #8070 - PR2 #8071 - PR3 #8072 - PR4 #8073
882dbe0 to
2131bb0
Compare
## Summary of changes - Introduce Test Optimization RunId and EnsureRunId with cache folder lifecycle. - Add `_DD_INTERNAL_TOPT_RUNID` to config mapping/docs and regenerate keys. - Update CI integration tests to set/print RunId for deterministic runs. - Adjust test helper thread naming for clearer CI debugging. ## Reason for change Provide a stable RunId before caching work that depends on it and keep configuration in sync. ## Implementation details - Add RunId/EnsureRunId to `ITestOptimization`/`TestOptimization` with environment propagation. - Update configuration mapping and generated CI visibility keys. - Update CI integration tests for RunId coverage. ## Test coverage CI passes then all changes are good. ## Other details - Stacked PRs (current marked): - PR1 #8070 - **CURRENT**: PR2 #8071 - PR3 #8072 - PR4 #8073
b8c4942 to
9debeb5
Compare
9ced60f to
721c611
Compare
## Summary of changes - Add git command caching and telemetry improvements for CI visibility. - Update GitInfo discovery and CI environment logging. - Update impacted tests for new git discovery behavior. JIRA: SDTEST-3226 ## Reason for change Reduce git command overhead and improve visibility into CI git metadata collection. ## Implementation details - Disk cache keyed by RunId in GitCommandHelper with safe.directory handling. - JSON annotations in ProcessHelpers for cache serialization. - Adjusted CI runner git discovery logic and tests. ## Test coverage CI passes then all changes are good. ## Other details - Stacked PRs (current marked): - PR1 #8070 - PR2 #8071 - **CURRENT**: PR3 #8072 - PR4 #8073
721c611 to
5eec120
Compare
Summary of changes
Reason for change
Reduce repeated HTTP calls and improve initialization performance for CI visibility features.
Implementation details
Test coverage
CI passes then all changes are good.
Other details