Extract ContainsSpanId to SpanCollection#8435
Extract ContainsSpanId to SpanCollection#8435andrewlock wants to merge 1 commit intoandrew/client-side-stats/client-side-stats-1-2from
ContainsSpanId to SpanCollection#8435Conversation
d367d99 to
efd496f
Compare
46c887a to
d2adf6e
Compare
BenchmarksBenchmark execution time: 2026-04-09 23:46:40 Comparing candidate commit efd496f in PR branch Found 28 performance improvements and 39 performance regressions! Performance is the same for 211 metrics, 10 unstable metrics.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8435) 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 (8435) - mean (71ms) : 69, 74
master - mean (72ms) : 69, 75
section Bailout
This PR (8435) - mean (76ms) : 73, 78
master - mean (76ms) : 74, 78
section CallTarget+Inlining+NGEN
This PR (8435) - mean (1,067ms) : 1019, 1116
master - mean (1,071ms) : 1008, 1134
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 (8435) - mean (112ms) : 109, 116
master - mean (112ms) : 109, 115
section Bailout
This PR (8435) - mean (113ms) : 110, 116
master - mean (114ms) : 112, 117
section CallTarget+Inlining+NGEN
This PR (8435) - mean (780ms) : 760, 801
master - mean (776ms) : 756, 796
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8435) - mean (99ms) : 96, 103
master - mean (99ms) : 95, 103
section Bailout
This PR (8435) - mean (99ms) : 96, 102
master - mean (99ms) : 96, 101
section CallTarget+Inlining+NGEN
This PR (8435) - mean (934ms) : 895, 972
master - mean (927ms) : 893, 961
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8435) - mean (98ms) : 94, 103
master - mean (97ms) : 94, 100
section Bailout
This PR (8435) - mean (99ms) : 96, 102
master - mean (99ms) : 96, 101
section CallTarget+Inlining+NGEN
This PR (8435) - mean (817ms) : 789, 845
master - mean (811ms) : 783, 840
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 (8435) - mean (194ms) : 189, 198
master - mean (194ms) : 191, 197
section Bailout
This PR (8435) - mean (197ms) : 194, 199
master - mean (198ms) : 195, 200
section CallTarget+Inlining+NGEN
This PR (8435) - mean (1,143ms) : 1104, 1182
master - mean (1,155ms) : 1094, 1216
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 (8435) - mean (277ms) : 272, 282
master - mean (279ms) : 275, 283
section Bailout
This PR (8435) - mean (278ms) : 274, 283
master - mean (279ms) : 276, 282
section CallTarget+Inlining+NGEN
This PR (8435) - mean (933ms) : 910, 955
master - mean (927ms) : 905, 949
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8435) - mean (270ms) : 266, 275
master - mean (271ms) : 267, 275
section Bailout
This PR (8435) - mean (271ms) : 267, 274
master - mean (271ms) : 268, 273
section CallTarget+Inlining+NGEN
This PR (8435) - mean (1,141ms) : 1107, 1176
master - mean (1,142ms) : 1097, 1186
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8435) - mean (269ms) : 265, 272
master - mean (269ms) : 266, 273
section Bailout
This PR (8435) - mean (269ms) : 266, 272
master - mean (269ms) : 266, 273
section CallTarget+Inlining+NGEN
This PR (8435) - mean (1,026ms) : 992, 1059
master - mean (1,024ms) : 982, 1066
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
efd496f to
bda5853
Compare
d2adf6e to
f8a1a26
Compare
Summary of changes
Extracts
ContainsSpanIdfromTraceChunkModeltoSpanCollectionReason for change
I need to find a given span in a
SpanCollectionfor client-side-stats. The algorithm used byTraceChunkModeldoes it "properly" (by stating from the last span when looking for a root span), so it seems to make sense to move this method toSpanCollection. Additionally, this essentially hides some of the internals about theSpanCollectiontype, so seems like a better place for it anyway.Implementation details
IndexOf()method fromTraceChunkModeltoSpanCollectionContains()instead, seeing as the index is never actually used AFAICT. It's easy to switch it back later if we do need it.Test coverage
Added some unit tests for the method
Other details
Part of a stack
charhelpers likeIsAsciiHexDigit#8417IpAddressObfuscationUtilfor use with client-side-stats #8418