Skip to content

[Code Origin] Reduce endpoint detector allocations#8588

Merged
dudikeleti merged 5 commits into
masterfrom
dudik/endpointdetector-allocation-reduction
May 8, 2026
Merged

[Code Origin] Reduce endpoint detector allocations#8588
dudikeleti merged 5 commits into
masterfrom
dudik/endpointdetector-allocation-reduction

Conversation

@dudikeleti

@dudikeleti dudikeleti commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Reduces allocations and CPU cost in EndpointDetector by avoiding metadata string materialization, removing matcher objects/arrays, and using direct metadata handle comparisons.
  • Classifies endpoint types with a single base-type walk instead of repeated controller/PageModel/SignalR checks.
  • Avoids unnecessary Razor Pages attribute scans by checking handler-shaped method names first.
  • Filters special-name methods so property/event accessors are not treated as endpoint candidates.
  • Reduces span code-origin sequence-point cache churn by storing only useful PDB entries in a mutable dictionary.

Reason for change

  • Span code origin endpoint detection runs in customer processes during per-assembly PDB cache population, so avoidable allocation and metadata work directly affect first-request latency and GC pressure.
  • The previous detector path could allocate heavily by materializing metadata strings and building intermediate endpoint collections.

Implementation details

  • Replaced generic MetadataName[] matching with specialized namespace/name predicates using MetadataReader.StringComparer.
  • Reworked type classification to prefer controller matches while collecting PageModel/SignalR fallback matches during one base-chain walk.
  • Kept endpoint enumeration as a struct-consumer API to avoid intermediate collections on the production path.
  • Switched SpanCodeOrigin endpoint cache storage from ImmutableDictionary<int, CachedSequencePoint?> with null entries to Dictionary<int, CachedSequencePoint> containing only usable sequence points.
  • BenchmarkDotNet results (net8.0, Release, short job, 3 iterations):
Scenario Before DetectEndpointMethodTokens After DetectEndpointMethodTokens
MixedSmall 8.97 us / 17,720 B 2.35 us / 0 B
NoEndpointsLarge 128.99 us / 236,680 B 35.63 us / 0 B
ManyPlainTypes 162.26 us / 319,528 B 27.63 us / 0 B
DeepInheritance 7.25 ms / 18.82 MB 1.19 ms / 0 B
RazorPagesManyHelpers 340.61 us / 359,896 B 132.52 us / 0 B
SignalRWithAccessors 371.42 us / 303,256 B 46.04 us / 0 B
TypeSpecGenericBases 467.43 us / 1.37 MB 56.13 us / 0 B
  • Cold probe example: DeepInheritance first-call mean allocation dropped from ~18.82 MB to ~1 KB.

Benchmark scenarios:

  • MixedSmall: realistic small mix of controllers, Razor Pages, SignalR, and generic hubs.
  • NoEndpointsLarge / ManyPlainTypes: large non-endpoint assemblies to measure fast rejection and attribute scan cost.
  • DeepInheritance: long base-class chains to stress base-type walking.
  • RazorPagesManyHelpers: PageModels with many helper methods to stress handler filtering.
  • SignalRWithAccessors: hubs with methods plus property/event accessors to validate special-name filtering.
  • TypeSpecGenericBases: generic base types like Hub<T> and nested wrappers to stress TypeSpecification parsing.

Test coverage

  • EndpointDetectorTests

@dudikeleti
dudikeleti requested a review from a team as a code owner May 7, 2026 23:58
@dudikeleti
dudikeleti requested a review from Copilot May 7, 2026 23:58
@dudikeleti dudikeleti added the type:performance Performance, speed, latency, resource usage (CPU, memory) label May 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes span code-origin endpoint detection and PDB sequence-point caching to reduce allocations and CPU overhead during per-assembly cache population (improving cold-path latency and GC pressure).

Changes:

  • Reworked EndpointDetector to avoid metadata string materialization/collections and to classify endpoint types via a single base-type walk with direct handle comparisons.
  • Updated SpanCodeOrigin to populate the per-assembly endpoint sequence-point cache via a struct consumer and store only usable entries in a mutable dictionary.
  • Expanded EndpointDetectorTests with additional coverage for inherited controller attributes, generic hub bases, and a “no endpoints” assembly scenario.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tracer/test/Datadog.Trace.Tests/Debugger/EndpointDetectorTests.cs Updates tests for the new consumer-based endpoint enumeration and adds new scenarios (inherited attributes, generic hub base, no-endpoints assembly).
tracer/src/Datadog.Trace/Debugger/SpanCodeOrigin/SpanCodeOrigin.cs Switches endpoint token enumeration to a consumer model and replaces the immutable cache with a dictionary containing only usable sequence points.
tracer/src/Datadog.Trace/Debugger/SpanCodeOrigin/EndpointDetector.cs Refactors endpoint detection to reduce allocations by using handle-based comparisons and a consumer API for results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tracer/test/Datadog.Trace.Tests/Debugger/EndpointDetectorTests.cs
Comment thread tracer/src/Datadog.Trace/Debugger/SpanCodeOrigin/SpanCodeOrigin.cs Outdated
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented May 8, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8588) 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
duration73.11 ± (73.06 - 73.39) ms74.56 ± (74.57 - 75.17) ms+2.0%✅⬆️
.NET Framework 4.8 - Bailout
duration76.71 ± (76.48 - 76.85) ms77.70 ± (77.65 - 78.03) ms+1.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1127.16 ± (1124.20 - 1131.26) ms1128.79 ± (1126.31 - 1133.25) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.52 ± (22.48 - 22.57) ms22.43 ± (22.38 - 22.48) ms-0.4%
process.time_to_main_ms84.87 ± (84.68 - 85.07) ms84.75 ± (84.48 - 85.02) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.84 ± (10.83 - 10.84) MB10.93 ± (10.92 - 10.93) MB+0.8%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.83 ± (22.77 - 22.89) ms22.35 ± (22.30 - 22.39) ms-2.1%
process.time_to_main_ms88.68 ± (88.38 - 88.97) ms85.53 ± (85.32 - 85.74) ms-3.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.92 - 10.93) MB10.96 ± (10.95 - 10.96) MB+0.3%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms204.61 ± (204.05 - 205.18) ms203.84 ± (203.30 - 204.38) ms-0.4%
process.time_to_main_ms567.27 ± (565.84 - 568.69) ms565.09 ± (563.70 - 566.49) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.69 ± (49.66 - 49.73) MB49.82 ± (49.79 - 49.84) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.7%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.53 ± (21.47 - 21.59) ms21.36 ± (21.30 - 21.42) ms-0.8%
process.time_to_main_ms75.51 ± (75.19 - 75.82) ms74.72 ± (74.41 - 75.03) ms-1.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.61) MB10.62 ± (10.62 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.18 ± (21.14 - 21.22) ms21.02 ± (20.98 - 21.06) ms-0.7%
process.time_to_main_ms74.05 ± (73.87 - 74.23) ms74.28 ± (74.10 - 74.46) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.73 ± (10.72 - 10.73) MB10.74 ± (10.74 - 10.74) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms352.52 ± (350.28 - 354.75) ms352.86 ± (350.63 - 355.10) ms+0.1%✅⬆️
process.time_to_main_ms563.58 ± (562.04 - 565.11) ms564.29 ± (562.57 - 566.02) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.00 ± (50.98 - 51.02) MB51.18 ± (51.16 - 51.20) MB+0.4%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.84 ± (19.77 - 19.92) ms19.95 ± (19.89 - 20.00) ms+0.5%✅⬆️
process.time_to_main_ms74.66 ± (74.34 - 74.99) ms75.40 ± (75.09 - 75.71) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.67 ± (7.66 - 7.67) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.97 ± (19.92 - 20.03) ms19.83 ± (19.78 - 19.89) ms-0.7%
process.time_to_main_ms77.05 ± (76.75 - 77.35) ms75.85 ± (75.61 - 76.10) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.71 - 7.72) MB7.72 ± (7.72 - 7.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms279.76 ± (277.53 - 281.99) ms282.46 ± (279.35 - 285.58) ms+1.0%✅⬆️
process.time_to_main_ms521.93 ± (520.83 - 523.02) ms523.14 ± (521.55 - 524.72) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.99 ± (37.96 - 38.02) MB37.83 ± (37.80 - 37.86) MB-0.4%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration206.55 ± (206.30 - 207.99) ms207.05 ± (207.07 - 208.42) ms+0.2%✅⬆️
.NET Framework 4.8 - Bailout
duration209.64 ± (209.54 - 210.80) ms209.86 ± (209.70 - 210.85) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1265.90 ± (1264.55 - 1274.04) ms1266.96 ± (1267.08 - 1273.14) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms200.00 ± (199.24 - 200.76) ms199.61 ± (199.02 - 200.19) ms-0.2%
process.time_to_main_ms87.29 ± (86.90 - 87.69) ms87.37 ± (87.06 - 87.67) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.02 ± (16.00 - 16.04) MB15.99 ± (15.97 - 16.00) MB-0.2%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.0%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms200.62 ± (199.92 - 201.32) ms197.45 ± (196.94 - 197.97) ms-1.6%
process.time_to_main_ms89.16 ± (88.80 - 89.52) ms87.32 ± (87.04 - 87.61) ms-2.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed15.99 ± (15.97 - 16.01) MB16.11 ± (16.10 - 16.13) MB+0.8%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.5%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms385.35 ± (384.00 - 386.69) ms384.24 ± (382.72 - 385.76) ms-0.3%
process.time_to_main_ms577.80 ± (576.16 - 579.43) ms569.48 ± (567.61 - 571.36) ms-1.4%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.68 ± (58.56 - 58.80) MB58.73 ± (58.55 - 58.92) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.7%
.NET 6 - Baseline
process.internal_duration_ms202.16 ± (201.48 - 202.85) ms200.90 ± (200.36 - 201.44) ms-0.6%
process.time_to_main_ms74.32 ± (74.04 - 74.61) ms73.89 ± (73.63 - 74.14) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.31 ± (16.29 - 16.33) MB16.31 ± (16.29 - 16.33) MB-0.0%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.2%
.NET 6 - Bailout
process.internal_duration_ms201.20 ± (200.54 - 201.86) ms201.03 ± (200.48 - 201.58) ms-0.1%
process.time_to_main_ms75.04 ± (74.82 - 75.25) ms75.23 ± (74.98 - 75.47) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.32 ± (16.31 - 16.34) MB16.35 ± (16.33 - 16.37) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.4%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms571.05 ± (568.52 - 573.58) ms567.93 ± (565.50 - 570.35) ms-0.5%
process.time_to_main_ms567.73 ± (566.43 - 569.03) ms568.68 ± (567.51 - 569.85) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.88 ± (61.85 - 61.92) MB61.99 ± (61.96 - 62.03) MB+0.2%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms199.39 ± (198.79 - 199.99) ms199.44 ± (198.90 - 199.98) ms+0.0%✅⬆️
process.time_to_main_ms73.56 ± (73.26 - 73.85) ms73.40 ± (73.16 - 73.64) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.66 ± (11.65 - 11.67) MB11.66 ± (11.64 - 11.67) MB+0.0%✅⬆️
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (18 - 19)+0.0%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms199.04 ± (198.40 - 199.68) ms200.24 ± (199.66 - 200.82) ms+0.6%✅⬆️
process.time_to_main_ms74.62 ± (74.36 - 74.88) ms75.04 ± (74.78 - 75.31) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.71 ± (11.70 - 11.73) MB11.74 ± (11.73 - 11.76) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms496.58 ± (491.92 - 501.24) ms496.92 ± (492.27 - 501.57) ms+0.1%✅⬆️
process.time_to_main_ms532.58 ± (531.15 - 534.02) ms531.80 ± (530.66 - 532.95) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.63 ± (51.58 - 51.67) MB51.58 ± (51.54 - 51.62) MB-0.1%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.4%✅⬆️
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 (8588) - mean (75ms)  : 70, 79
    master - mean (73ms)  : 71, 76

    section Bailout
    This PR (8588) - mean (78ms)  : 75, 80
    master - mean (77ms)  : 75, 79

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (1,130ms)  : 1080, 1180
    master - mean (1,128ms)  : 1076, 1179

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 (8588) - mean (114ms)  : 108, 121
    master - mean (114ms)  : 111, 118

    section Bailout
    This PR (8588) - mean (115ms)  : 112, 118
    master - mean (119ms)  : 113, 124

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (807ms)  : 776, 837
    master - mean (810ms)  : 785, 835

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8588) - mean (103ms)  : 96, 110
    master - mean (103ms)  : 97, 109

    section Bailout
    This PR (8588) - mean (102ms)  : 98, 105
    master - mean (101ms)  : 99, 104

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (946ms)  : 906, 986
    master - mean (946ms)  : 898, 994

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8588) - mean (103ms)  : 98, 109
    master - mean (103ms)  : 96, 109

    section Bailout
    This PR (8588) - mean (104ms)  : 98, 110
    master - mean (105ms)  : 99, 111

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (835ms)  : 779, 892
    master - mean (831ms)  : 791, 871

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 (8588) - mean (208ms)  : 198, 217
    master - mean (207ms)  : 194, 220

    section Bailout
    This PR (8588) - mean (210ms)  : 202, 219
    master - mean (210ms)  : 201, 219

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (1,270ms)  : 1229, 1312
    master - mean (1,269ms)  : 1220, 1319

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 (8588) - mean (297ms)  : 283, 310
    master - mean (298ms)  : 280, 315

    section Bailout
    This PR (8588) - mean (295ms)  : 282, 307
    master - mean (300ms)  : 285, 316

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (995ms)  : 976, 1014
    master - mean (1,005ms)  : 970, 1041

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8588) - mean (285ms)  : 272, 297
    master - mean (287ms)  : 270, 303

    section Bailout
    This PR (8588) - mean (286ms)  : 273, 298
    master - mean (286ms)  : 272, 301

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (1,167ms)  : 1127, 1207
    master - mean (1,167ms)  : 1120, 1215

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8588) - mean (284ms)  : 272, 296
    master - mean (285ms)  : 270, 300

    section Bailout
    This PR (8588) - mean (286ms)  : 274, 298
    master - mean (285ms)  : 271, 299

    section CallTarget+Inlining+NGEN
    This PR (8588) - mean (1,065ms)  : 990, 1140
    master - mean (1,064ms)  : 984, 1145

Loading

@pr-commenter

pr-commenter Bot commented May 8, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-08 19:13:31

Comparing candidate commit 8e4c1e6 in PR branch dudik/endpointdetector-allocation-reduction with baseline commit d34f526 in branch master.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in baseline:

  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan net472
  • Benchmarks.OpenTelemetry.Api.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

Found 4 performance improvements and 2 performance regressions! Performance is the same for 47 metrics, 19 unstable metrics, 89 known flaky benchmarks, 37 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.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartRootSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-96 bytes; -95 bytes] or [-6.320%; -6.312%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TracerBenchmark.StartSpan_GetCurrentSpan net6.0

  • 🟥 allocated_mem [+143 bytes; +144 bytes] or [+10.108%; +10.117%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 throughput [-66186.781op/s; -60322.002op/s] or [-44.962%; -40.978%]
  • 🟩 execution_time [-51.675ms; -39.389ms] or [-25.643%; -19.547%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1

  • 🟩 execution_time [-97.259ms; -95.468ms] or [-48.571%; -47.676%]

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.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0

  • unstable execution_time [-48.414ms; -3.213ms] or [-29.011%; -1.925%]
  • unstable throughput [+8629.490op/s; +43275.739op/s] or [+5.564%; +27.902%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [-15.854ms; +19.923ms] or [-14.159%; +17.792%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [-6.980ms; +18.252ms] or [-4.748%; +12.417%]
  • unstable throughput [-16879.736op/s; +7776.916op/s] or [-12.183%; +5.613%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-19.050ms; +7.816ms] or [-13.530%; +5.551%]
  • unstable throughput [+4367.671op/s; +32797.188op/s] or [+2.729%; +20.492%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1

  • unstable execution_time [-1.192ms; +37.993ms] or [-1.033%; +32.941%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [-13.451ms; +9.408ms] or [-8.952%; +6.261%]
  • unstable throughput [-3250.894op/s; +12147.244op/s] or [-2.506%; +9.364%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [+50.515ms; +80.194ms] or [+54.644%; +86.749%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [-39.149ms; +7.578ms] or [-23.678%; +4.583%]
  • unstable throughput [-11157.568op/s; +22684.283op/s] or [-6.620%; +13.459%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1

  • unstable execution_time [-35.232ms; -9.674ms] or [-31.961%; -8.776%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0

  • unstable execution_time [+44.006ms; +73.700ms] or [+36.128%; +60.505%]
  • unstable throughput [-42899.933op/s; -19790.694op/s] or [-22.799%; -10.517%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-17776.354µs; +17187.726µs] or [-15.808%; +15.284%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]
  • unstable execution_time [-19.334ms; +12.297ms] or [-12.523%; +7.965%]
  • unstable throughput [+1872.139op/s; +27371.641op/s] or [+1.222%; +17.864%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1

  • unstable execution_time [+50.145ms; +80.624ms] or [+55.490%; +89.216%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0

  • unstable execution_time [+35.846ms; +75.717ms] or [+28.853%; +60.945%]
  • unstable throughput [-45921.980op/s; -23558.118op/s] or [-29.687%; -15.230%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1

  • unstable execution_time [+51.637ms; +82.416ms] or [+59.138%; +94.389%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0

  • unstable execution_time [-44.559ms; -11.906ms] or [-29.280%; -7.823%]
  • unstable throughput [+9000.029op/s; +29568.470op/s] or [+5.870%; +19.285%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0

  • unstable execution_time [-19.184ms; +16.759ms] or [-16.142%; +14.102%]
  • unstable throughput [-14264.138op/s; +10634.164op/s] or [-10.936%; +8.153%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1

  • unstable execution_time [+10.773ms; +36.478ms] or [+12.140%; +41.104%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0

  • unstable execution_time [+2.005ms; +33.059ms] or [+1.320%; +21.768%]
  • unstable throughput [-26168.857op/s; -12614.926op/s] or [-20.271%; -9.772%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1

  • unstable execution_time [-33.320ms; -9.499ms] or [-29.292%; -8.351%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0

  • unstable execution_time [-51.359ms; -7.635ms] or [-26.237%; -3.900%]
  • unstable throughput [+5745.136op/s; +32769.383op/s] or [+5.228%; +29.822%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0

  • 🟩 allocated_mem [-144 bytes; -143 bytes] or [-9.188%; -9.180%]
  • unstable execution_time [+4.934ms; +22.528ms] or [+3.943%; +18.005%]

scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1

  • unstable execution_time [-15.572ms; +18.929ms] or [-14.062%; +17.094%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-11345.185op/s; -10228.405op/s] or [-13.452%; -12.128%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • unstable execution_time [+1.159ms; +32.804ms] or [+0.578%; +16.366%]
  • 🟥 throughput [-71294.173op/s; -63352.604op/s] or [-59.926%; -53.250%]

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

  • unstable execution_time [-91.522ms; -68.166ms] or [-46.033%; -34.285%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+309.594ms; +326.063ms] or [+153.631%; +161.804%]
  • 🟥 throughput [-56.012op/s; -42.941op/s] or [-10.078%; -7.726%]

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

  • 🟥 execution_time [+98.159ms; +102.422ms] or [+77.552%; +80.920%]
  • 🟩 throughput [+82.000op/s; +95.325op/s] or [+10.811%; +12.568%]

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

  • 🟥 execution_time [+83.681ms; +84.642ms] or [+74.055%; +74.905%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+9.299%; +9.310%]
  • unstable execution_time [-61.136ms; -38.614ms] or [-28.553%; -18.034%]
  • unstable throughput [-25230.968op/s; -10383.966op/s] or [-18.417%; -7.580%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]
  • 🟩 execution_time [-75.869ms; -58.568ms] or [-36.128%; -27.890%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-272578.917op/s; -264859.962op/s] or [-27.832%; -27.043%]

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

  • 🟥 allocated_mem [+439 bytes; +440 bytes] or [+35.945%; +35.954%]
  • unstable execution_time [-101.105ms; -69.936ms] or [-45.088%; -31.188%]
  • unstable throughput [-183966.575op/s; -69486.449op/s] or [-19.653%; -7.423%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • unstable execution_time [-80.052ms; -59.443ms] or [-39.959%; -29.671%]
  • 🟥 throughput [-124908.145op/s; -108339.818op/s] or [-17.947%; -15.566%]

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

  • 🟩 execution_time [-31.911ms; -14.456ms] or [-16.101%; -7.294%]
  • 🟥 throughput [-30326.735op/s; -16529.940op/s] or [-19.296%; -10.518%]

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

  • 🟩 execution_time [-33.890ms; -14.810ms] or [-17.278%; -7.551%]
  • 🟩 throughput [+9985.257op/s; +12655.294op/s] or [+7.955%; +10.082%]

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

  • unstable execution_time [-40.674ms; -17.808ms] or [-20.110%; -8.805%]
  • unstable throughput [-632557.301op/s; -285411.507op/s] or [-21.092%; -9.517%]

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

  • unstable execution_time [-83.123ms; -58.017ms] or [-38.317%; -26.744%]
  • 🟩 throughput [+169652.603op/s; +224724.740op/s] or [+6.734%; +8.920%]

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

  • 🟥 execution_time [+301.894ms; +315.882ms] or [+150.846%; +157.835%]

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

  • 🟥 execution_time [+133.514ms; +139.937ms] or [+67.331%; +70.570%]

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

  • 🟥 execution_time [+303.598ms; +310.490ms] or [+152.929%; +156.401%]

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

  • 🟥 execution_time [+299.615ms; +313.175ms] or [+147.159%; +153.819%]

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

  • 🟥 execution_time [+257.797ms; +276.784ms] or [+126.028%; +135.309%]

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

  • 🟥 execution_time [+287.692ms; +301.307ms] or [+143.788%; +150.593%]

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

  • 🟥 execution_time [+16.317µs; +39.924µs] or [+5.209%; +12.746%]
  • 🟥 throughput [-377.422op/s; -178.714op/s] or [-11.765%; -5.571%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+300.690ms; +301.433ms] or [+150.075%; +150.446%]

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

  • unstable execution_time [+363.833ms; +387.963ms] or [+395.319%; +421.537%]
  • 🟥 throughput [-7023.530op/s; -6780.966op/s] or [-57.713%; -55.720%]

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

  • unstable execution_time [+325.165ms; +352.508ms] or [+246.895%; +267.656%]
  • 🟥 throughput [-1138.824op/s; -917.974op/s] or [-11.025%; -8.887%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+299.359ms; +313.671ms] or [+137.642%; +144.223%]
  • 🟥 throughput [-683.631op/s; -666.845op/s] or [-61.944%; -60.423%]

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

  • unstable execution_time [-62.041ms; +71.236ms] or [-26.439%; +30.358%]
  • 🟥 throughput [-671.306op/s; -586.493op/s] or [-44.776%; -39.119%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+335.254ms; +343.640ms] or [+200.521%; +205.537%]
  • 🟥 throughput [-726.593op/s; -692.127op/s] or [-50.592%; -48.192%]

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

  • 🟩 execution_time [-209.747µs; -197.366µs] or [-10.625%; -9.998%]
  • 🟩 throughput [+56.354op/s; +60.292op/s] or [+11.125%; +11.902%]

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

  • 🟩 throughput [+13.213op/s; +15.056op/s] or [+5.210%; +5.937%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.999ms; +317.098ms] or [+152.585%; +159.684%]

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

  • unstable execution_time [+232.157ms; +252.902ms] or [+116.334%; +126.730%]

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

  • 🟥 execution_time [+299.065ms; +305.960ms] or [+150.237%; +153.701%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.255ms; +315.507ms] or [+151.280%; +158.437%]

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

  • unstable execution_time [+166.359ms; +216.836ms] or [+82.257%; +107.216%]

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

  • 🟥 execution_time [+303.642ms; +310.947ms] or [+153.899%; +157.602%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+302.434ms; +316.468ms] or [+151.795%; +158.838%]

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

  • 🟥 execution_time [+303.316ms; +309.804ms] or [+151.175%; +154.409%]
  • 🟩 throughput [+39900.518op/s; +48295.964op/s] or [+7.923%; +9.590%]

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

  • 🟥 execution_time [+300.005ms; +305.857ms] or [+149.250%; +152.161%]

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

  • unstable execution_time [-44.113ms; -11.497ms] or [-20.513%; -5.346%]
  • unstable throughput [-171788.297op/s; -120374.722op/s] or [-47.126%; -33.022%]

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

  • unstable execution_time [-49.712ms; -23.293ms] or [-24.936%; -11.684%]

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

  • 🟩 allocated_mem [-20.178KB; -20.156KB] or [-7.360%; -7.352%]
  • unstable execution_time [-70.532µs; -18.117µs] or [-13.940%; -3.581%]

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

  • 🟩 execution_time [-85.509µs; -32.040µs] or [-14.818%; -5.552%]
  • 🟩 throughput [+110.810op/s; +255.830op/s] or [+6.331%; +14.616%]

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

  • unstable execution_time [+1.355µs; +5.988µs] or [+3.203%; +14.153%]

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

  • unstable execution_time [-13.655µs; -4.171µs] or [-21.185%; -6.471%]
  • unstable throughput [+1310.265op/s; +3286.136op/s] or [+8.039%; +20.162%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+304.748ms; +318.631ms] or [+154.037%; +161.054%]

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

  • 🟥 execution_time [+305.070ms; +312.404ms] or [+155.280%; +159.013%]

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

  • 🟥 execution_time [+301.653ms; +307.703ms] or [+151.015%; +154.043%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • unstable execution_time [-52.192ms; -26.508ms] or [-26.088%; -13.250%]
  • unstable throughput [-227907.737op/s; -169968.494op/s] or [-43.138%; -32.171%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • unstable execution_time [-31.351ms; -6.094ms] or [-15.892%; -3.089%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.665ms; +315.478ms] or [+149.854%; +157.237%]

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

  • 🟥 execution_time [+303.786ms; +309.533ms] or [+152.547%; +155.433%]

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

  • 🟥 execution_time [+305.297ms; +312.058ms] or [+154.827%; +158.256%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.598ms; +301.432ms] or [+149.940%; +150.356%]
  • 🟩 throughput [+64897913.552op/s; +65259904.946op/s] or [+47.263%; +47.526%]

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

  • unstable execution_time [+372.867ms; +383.359ms] or [+463.727%; +476.775%]
  • 🟥 throughput [-7385.833op/s; -7184.607op/s] or [-57.096%; -55.541%]

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

  • 🟥 execution_time [+296.302ms; +298.138ms] or [+147.789%; +148.704%]
  • 🟥 throughput [-17364368.602op/s; -16231662.865op/s] or [-7.691%; -7.190%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • 🟥 throughput [-52482.614op/s; -45209.677op/s] or [-5.857%; -5.045%]

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

  • unstable execution_time [-75.189ms; -46.411ms] or [-36.826%; -22.731%]
  • unstable throughput [-227666.937op/s; -68863.250op/s] or [-21.257%; -6.430%]

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

  • unstable execution_time [-71.276ms; -45.569ms] or [-36.066%; -23.058%]

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

  • 🟩 execution_time [-90.088ms; -85.807ms] or [-46.936%; -44.706%]
  • 🟩 throughput [+89923.984op/s; +119498.604op/s] or [+6.960%; +9.249%]

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

  • unstable execution_time [-72.921ms; -47.073ms] or [-35.827%; -23.128%]
  • 🟩 throughput [+78128.440op/s; +86879.326op/s] or [+7.759%; +8.629%]

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

  • unstable execution_time [-74.059ms; -49.117ms] or [-36.985%; -24.529%]
  • unstable throughput [-112923.005op/s; -36357.701op/s] or [-20.505%; -6.602%]

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

  • unstable execution_time [-70.130ms; -43.502ms] or [-35.236%; -21.857%]

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

  • unstable execution_time [-77.887ms; -48.480ms] or [-38.957%; -24.249%]
  • unstable throughput [-210162.964op/s; -69932.703op/s] or [-23.480%; -7.813%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • unstable execution_time [-32.111ms; -9.741ms] or [-16.309%; -4.947%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • 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_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • 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_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • 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.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

@dudikeleti
dudikeleti force-pushed the dudik/endpointdetector-allocation-reduction branch from 2470486 to 62657a0 Compare May 8, 2026 07:04
@dudikeleti
dudikeleti requested a review from a team as a code owner May 8, 2026 07:04

@andrewlock andrewlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

Comment thread tracer/src/Datadog.Trace/Debugger/SpanCodeOrigin/SpanCodeOrigin.cs Outdated
Comment thread tracer/src/Datadog.Trace/Debugger/SpanCodeOrigin/EndpointDetector.cs Outdated
@dudikeleti
dudikeleti requested review from jpbempel and tylfin May 8, 2026 10:56
@dudikeleti
dudikeleti enabled auto-merge (squash) May 8, 2026 10:56
@dudikeleti
dudikeleti removed the request for review from jpbempel May 8, 2026 18:14
dudikeleti added 5 commits May 8, 2026 20:14
Avoid string materialization and redundant metadata walks when detecting endpoint methods for span code origin. Also reduce sequence-point cache churn by storing only useful entries in a mutable dictionary.
@dudikeleti
dudikeleti force-pushed the dudik/endpointdetector-allocation-reduction branch from fce44a3 to 8e4c1e6 Compare May 8, 2026 18:15
@dudikeleti
dudikeleti merged commit 433c2c3 into master May 8, 2026
140 of 141 checks passed
@dudikeleti
dudikeleti deleted the dudik/endpointdetector-allocation-reduction branch May 8, 2026 21:14
@github-actions github-actions Bot added this to the vNext-v3 milestone May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:code-origin area:debugger type:performance Performance, speed, latency, resource usage (CPU, memory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants