Add pagination metrics for known tests fetch#8897
Conversation
Add three new distribution metrics to track known tests pagination: - known_tests.pages_fetched - number of pages fetched - known_tests.total_fetch_ms - wall-clock time for entire fetch - known_tests.total_request_ms - sum of per-page request times Metrics are emitted only on successful completion of pagination. Changes: - Added enum entries to DistributionCIVisibility.cs - Updated GetKnownTestsAsync to track timing with Stopwatch and ActionCallbacks - Added unit tests to MetricsTelemetryCollectorTests.cs Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2707b01 to
eed6b87
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8897) 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 (8897) - mean (71ms) : 67, 75
master - mean (71ms) : 66, 75
section Bailout
This PR (8897) - mean (74ms) : 72, 76
master - mean (74ms) : 72, 75
section CallTarget+Inlining+NGEN
This PR (8897) - mean (1,103ms) : 1026, 1180
master - mean (1,078ms) : 1039, 1118
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 (8897) - mean (111ms) : 105, 118
master - mean (109ms) : 104, 115
section Bailout
This PR (8897) - mean (111ms) : 109, 113
master - mean (110ms) : 108, 111
section CallTarget+Inlining+NGEN
This PR (8897) - mean (789ms) : 764, 814
master - mean (778ms) : 756, 800
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8897) - mean (97ms) : 94, 99
master - mean (96ms) : 94, 98
section Bailout
This PR (8897) - mean (101ms) : 96, 107
master - mean (100ms) : 94, 106
section CallTarget+Inlining+NGEN
This PR (8897) - mean (946ms) : 907, 984
master - mean (939ms) : 905, 974
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8897) - mean (99ms) : 95, 104
master - mean (96ms) : 91, 100
section Bailout
This PR (8897) - mean (98ms) : 96, 100
master - mean (95ms) : 93, 97
section CallTarget+Inlining+NGEN
This PR (8897) - mean (819ms) : 785, 853
master - mean (812ms) : 775, 848
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 (8897) - mean (193ms) : 189, 196
master - mean (190ms) : 187, 194
section Bailout
This PR (8897) - mean (196ms) : 193, 198
master - mean (193ms) : 191, 195
section CallTarget+Inlining+NGEN
This PR (8897) - mean (1,184ms) : 1115, 1253
master - mean (1,163ms) : 1121, 1205
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 (8897) - mean (275ms) : 268, 282
master - mean (272ms) : 268, 276
section Bailout
This PR (8897) - mean (275ms) : 272, 278
master - mean (273ms) : 270, 276
section CallTarget+Inlining+NGEN
This PR (8897) - mean (943ms) : 919, 968
master - mean (935ms) : 912, 958
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8897) - mean (268ms) : 261, 276
master - mean (266ms) : 262, 270
section Bailout
This PR (8897) - mean (268ms) : 265, 270
master - mean (266ms) : 263, 268
section CallTarget+Inlining+NGEN
This PR (8897) - mean (1,151ms) : 1096, 1206
master - mean (1,139ms) : 1104, 1173
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8897) - mean (265ms) : 258, 272
master - mean (263ms) : 259, 267
section Bailout
This PR (8897) - mean (266ms) : 263, 269
master - mean (263ms) : 260, 266
section CallTarget+Inlining+NGEN
This PR (8897) - mean (1,033ms) : 985, 1082
master - mean (1,020ms) : 982, 1058
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-07-13 12:44:01 Comparing candidate commit eed6b87 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 62 known flaky benchmarks, 64 flaky benchmarks without significant changes.
|
What does this PR do?
Adds three new distribution metrics to track known tests (Early Flake Detection) pagination behavior:
known_tests.pages_fetched- Number of pages fetched during paginationknown_tests.total_fetch_ms- Wall-clock time from first to last page requestknown_tests.total_request_ms- Sum of individual per-page request durationsMotivation
Currently, only per-request timing is tracked via
known_tests.request_ms. These new metrics provide observability into:Implementation Details
DistributionCIVisibility.cswith telemetry attributesGetKnownTestsAsyncto useActionCallbackswith closures for accumulating request timingStopwatchto track wall-clock duration across pagination loopTesting
MetricsTelemetryCollectorTests.cs:KnownTestsPaginationMetrics_AreRecordedCorrectly- single value recordingKnownTestsPaginationMetrics_AggregateMultipleValues- aggregation across multiple fetchesChecklist