Skip to content

Small perf improvement for some TagList implementations#7887

Merged
andrewlock merged 3 commits intomasterfrom
andrew/tags
Dec 10, 2025
Merged

Small perf improvement for some TagList implementations#7887
andrewlock merged 3 commits intomasterfrom
andrew/tags

Conversation

@andrewlock
Copy link
Member

Summary of changes

Tags that are readonly should be implemented as such, and return a value directly

Reason for change

We have some tags that currently always return the same value, but are implemented as writeable fields. This requires a backing field, and so means the object is sliiiightly more allocatey than it needs to be.

Implementation details

Switch to using => readonly properties instead of { get; set; }

Test coverage

If the tests pass, it's fine

@andrewlock andrewlock requested review from a team as code owners December 1, 2025 18:17
@andrewlock andrewlock added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:performance Performance, speed, latency, resource usage (CPU, memory) labels Dec 1, 2025
@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Dec 1, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7887) 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
duration75.20 ± (75.06 - 75.81) ms75.29 ± (75.08 - 75.83) ms+0.1%✅⬆️
.NET Framework 4.8 - Bailout
duration80.14 ± (79.66 - 80.33) ms79.91 ± (79.62 - 80.46) ms-0.3%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1061.28 ± (1060.69 - 1069.10) ms1072.63 ± (1072.78 - 1082.21) ms+1.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.90 ± (22.82 - 22.98) ms22.90 ± (22.83 - 22.97) ms-0.0%
process.time_to_main_ms86.19 ± (85.81 - 86.58) ms86.77 ± (86.46 - 87.08) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.89 ± (10.88 - 10.89) MB10.93 ± (10.92 - 10.93) MB+0.4%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.80 ± (22.73 - 22.87) ms22.88 ± (22.80 - 22.96) ms+0.3%✅⬆️
process.time_to_main_ms88.17 ± (87.83 - 88.52) ms88.41 ± (88.08 - 88.74) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.97 ± (10.97 - 10.97) MB+0.3%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms222.40 ± (221.00 - 223.80) ms221.63 ± (220.21 - 223.05) ms-0.3%
process.time_to_main_ms500.58 ± (499.49 - 501.66) ms504.14 ± (503.01 - 505.27) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.88 ± (47.86 - 47.90) MB48.09 ± (48.07 - 48.11) MB+0.4%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.6%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.56 ± (21.50 - 21.61) ms21.61 ± (21.54 - 21.68) ms+0.3%✅⬆️
process.time_to_main_ms74.33 ± (74.00 - 74.66) ms75.68 ± (75.28 - 76.07) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.61) MB10.64 ± (10.64 - 10.64) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.45 ± (21.39 - 21.51) ms21.44 ± (21.38 - 21.50) ms-0.1%
process.time_to_main_ms75.31 ± (75.02 - 75.60) ms75.23 ± (74.94 - 75.52) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.67 ± (10.66 - 10.67) MB10.68 ± (10.68 - 10.68) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.03 ± (208.87 - 211.18) ms210.81 ± (209.65 - 211.96) ms+0.4%✅⬆️
process.time_to_main_ms464.51 ± (463.44 - 465.58) ms465.89 ± (464.93 - 466.86) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.33 ± (48.31 - 48.36) MB48.36 ± (48.33 - 48.39) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.85 ± (19.79 - 19.92) ms19.70 ± (19.64 - 19.76) ms-0.8%
process.time_to_main_ms74.57 ± (74.23 - 74.91) ms74.41 ± (74.07 - 74.75) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.67) MB7.66 ± (7.65 - 7.67) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.75 ± (19.69 - 19.80) ms19.57 ± (19.52 - 19.61) ms-0.9%
process.time_to_main_ms74.72 ± (74.47 - 74.97) ms75.09 ± (74.84 - 75.34) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.70 - 7.72) MB7.71 ± (7.70 - 7.72) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms187.94 ± (187.08 - 188.80) ms191.45 ± (190.49 - 192.41) ms+1.9%✅⬆️
process.time_to_main_ms446.56 ± (445.65 - 447.48) ms450.76 ± (449.85 - 451.68) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.42 ± (36.39 - 36.45) MB36.53 ± (36.49 - 36.57) MB+0.3%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.0%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration194.83 ± (194.78 - 195.60) ms195.36 ± (195.34 - 196.20) ms+0.3%✅⬆️
.NET Framework 4.8 - Bailout
duration198.95 ± (198.49 - 199.64) ms197.88 ± (197.71 - 198.34) ms-0.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1121.42 ± (1126.59 - 1135.98) ms1120.73 ± (1121.07 - 1129.37) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms189.67 ± (189.22 - 190.12) ms190.68 ± (190.25 - 191.11) ms+0.5%✅⬆️
process.time_to_main_ms81.28 ± (81.00 - 81.55) ms81.30 ± (81.08 - 81.52) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.04 ± (16.01 - 16.07) MB16.09 ± (16.06 - 16.11) MB+0.3%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.2%
.NET Core 3.1 - Bailout
process.internal_duration_ms189.36 ± (188.95 - 189.76) ms189.44 ± (188.99 - 189.90) ms+0.0%✅⬆️
process.time_to_main_ms82.60 ± (82.42 - 82.79) ms82.40 ± (82.19 - 82.61) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.08 - 16.13) MB16.13 ± (16.09 - 16.16) MB+0.1%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.1%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms399.58 ± (396.94 - 402.22) ms403.55 ± (400.37 - 406.73) ms+1.0%✅⬆️
process.time_to_main_ms478.95 ± (478.26 - 479.63) ms477.73 ± (476.96 - 478.50) ms-0.3%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.53 ± (58.39 - 58.67) MB58.63 ± (58.49 - 58.77) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms195.50 ± (195.02 - 195.98) ms194.38 ± (193.94 - 194.81) ms-0.6%
process.time_to_main_ms70.82 ± (70.58 - 71.05) ms70.05 ± (69.84 - 70.27) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.28 ± (16.25 - 16.31) MB16.34 ± (16.30 - 16.37) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.4%
.NET 6 - Bailout
process.internal_duration_ms193.25 ± (192.80 - 193.71) ms194.83 ± (194.35 - 195.30) ms+0.8%✅⬆️
process.time_to_main_ms71.39 ± (71.20 - 71.57) ms71.71 ± (71.52 - 71.91) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.36 ± (16.33 - 16.39) MB16.38 ± (16.35 - 16.41) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.0%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms411.97 ± (409.88 - 414.05) ms410.02 ± (407.74 - 412.31) ms-0.5%
process.time_to_main_ms449.57 ± (448.91 - 450.24) ms448.20 ± (447.48 - 448.92) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed59.26 ± (59.15 - 59.38) MB59.04 ± (58.90 - 59.17) MB-0.4%
runtime.dotnet.threads.count29 ± (29 - 29)30 ± (30 - 30)+0.4%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms191.71 ± (191.27 - 192.14) ms192.21 ± (191.78 - 192.63) ms+0.3%✅⬆️
process.time_to_main_ms69.89 ± (69.68 - 70.10) ms69.87 ± (69.66 - 70.07) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.74 ± (11.71 - 11.76) MB11.70 ± (11.68 - 11.73) MB-0.3%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms191.46 ± (190.97 - 191.95) ms191.93 ± (191.49 - 192.36) ms+0.2%✅⬆️
process.time_to_main_ms70.95 ± (70.77 - 71.13) ms70.87 ± (70.69 - 71.05) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.82 ± (11.79 - 11.85) MB11.71 ± (11.69 - 11.74) MB-0.9%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.4%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms368.30 ± (366.90 - 369.69) ms369.13 ± (367.85 - 370.42) ms+0.2%✅⬆️
process.time_to_main_ms433.47 ± (432.82 - 434.13) ms432.50 ± (431.70 - 433.29) ms-0.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.00 ± (47.97 - 48.03) MB47.96 ± (47.93 - 48.00) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.6%✅⬆️
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 (7887) - mean (75ms)  : 70, 81
    master - mean (75ms)  : 70, 81

    section Bailout
    This PR (7887) - mean (80ms)  : 74, 87
    master - mean (80ms)  : 75, 85

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (1,077ms)  : 1010, 1145
    master - mean (1,065ms)  : 1004, 1126

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 (7887) - mean (117ms)  : 112, 122
    master - mean (116ms)  : 109, 123

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

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (766ms)  : 721, 810
    master - mean (763ms)  : 721, 806

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

    section Bailout
    This PR (7887) - mean (104ms)  : 98, 110
    master - mean (103ms)  : 97, 110

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (707ms)  : 677, 737
    master - mean (702ms)  : 669, 736

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

    section Bailout
    This PR (7887) - mean (103ms)  : 98, 107
    master - mean (103ms)  : 98, 107

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (676ms)  : 645, 707
    master - mean (667ms)  : 639, 695

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 (7887) - mean (196ms)  : 190, 202
    master - mean (195ms)  : 191, 200

    section Bailout
    This PR (7887) - mean (198ms)  : 195, 201
    master - mean (199ms)  : 193, 205

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (1,125ms)  : 1066, 1184
    master - mean (1,131ms)  : 1065, 1198

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 (7887) - mean (280ms)  : 271, 290
    master - mean (279ms)  : 273, 285

    section Bailout
    This PR (7887) - mean (280ms)  : 274, 286
    master - mean (280ms)  : 275, 286

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (916ms)  : 867, 966
    master - mean (916ms)  : 876, 956

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7887) - mean (273ms)  : 265, 281
    master - mean (275ms)  : 268, 281

    section Bailout
    This PR (7887) - mean (275ms)  : 268, 281
    master - mean (273ms)  : 267, 279

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (892ms)  : 851, 934
    master - mean (898ms)  : 846, 949

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7887) - mean (272ms)  : 264, 279
    master - mean (271ms)  : 265, 277

    section Bailout
    This PR (7887) - mean (272ms)  : 266, 279
    master - mean (272ms)  : 266, 277

    section CallTarget+Inlining+NGEN
    This PR (7887) - mean (833ms)  : 809, 857
    master - mean (831ms)  : 799, 862

Loading

tags.MessagingDestinationName = entityPath;
tags.MessagingOperation = operationName;
tags.MessagingSystem = "servicebus";
tags.InstrumentationName = "AzureServiceBus";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought there was a reason why this writable but seems fine to me

@@ -126,7 +126,6 @@ private static CallTargetState CreateSenderSpanInternal(
tags.MessagingDestinationName = entityPath;
tags.MessagingOperation = operationName;
tags.MessagingSystem = "servicebus";
Copy link
Member

@lucaspimentel lucaspimentel Dec 8, 2025

Choose a reason for hiding this comment

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

Probably more than you wanted to do this PR, but I was looking into why we can't do the same with MessagingSystem, and noticed that AzureServiceBusTags inherits that property from OpenTelemetryTags, but I don't think AzureServiceBusTags needs to inherit from OpenTelemetryTags anymore now that the Service Bus integration uses call-target instrumentation instead of the OpenTelemetry observer.

Maybe something @pablomartinezbernardo can look into later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I was going to take a look at this, but given our lack of extensive ServiceBus testing, I was a little hesitant, so will move to a separate PR

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, as far as I can tell, we still have an OpenTelemetry observer? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I don't know if we still use the observer. Question for Pablo 😅

@datadog-official
Copy link

datadog-official bot commented Dec 10, 2025

⚠️ Tests

⚠️ Warnings

❄️ 3 New flaky tests detected

DirectlyShipsLogs from Datadog.Trace.ClrProfiler.IntegrationTests.ILoggerTests (Datadog)
Expected logs to contain only items matching (Convert(x.LogLevel, Int32) == 2), but 
{
    Datadog.Trace.TestHelpers.MockLogsIntake+Log
    {
        Env = "integration_tests", 
        EventId = "22", 
        Exception = <null>, 
        Host = "integration_ilogger_tests", 
        LogLevel = DirectSubmissionLogLevel.Warning {value: 3}, 
        Message = "Heartbeat took longer than "00:00:01" at "12/10/2025 09:44:27 +00:00". This could be caused by thread pool starvation.", 
...
TestSecurityInitialization from Datadog.Trace.Security.IntegrationTests.AspNetCore5AsmInitializationSecurityEnabled (Datadog)
Results do not match.
Differences:
Received: Security.AspNetCore5AsmInitializationSecurityEnabled.TestSecurityInitialization.received.txt
Verified: Security.AspNetCore5AsmInitializationSecurityEnabled.TestSecurityInitialization.verified.txt
Compare Result:
- [
+ []
-   {
-     TraceId: Id_1,
-     SpanId: Id_2,
...
SinkRejectsGiantMessages from Datadog.Trace.Tests.Logging.DirectSubmission.Sink.DatadogSinkTests (Datadog)
Expected logsApi.Logs to be True, but found False.

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 988ac78 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Dec 10, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7887 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.128
  • 3 benchmarks have fewer allocations
  • 2 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 11.1μs 60.2ns 356ns 0 0 0 5.49 KB
master StartStopWithChild netcoreapp3.1 14.4μs 75.3ns 353ns 0 0 0 5.7 KB
master StartStopWithChild net472 22.4μs 116ns 567ns 1.01 0.45 0.113 5.95 KB
#7887 StartStopWithChild net6.0 10.8μs 34.7ns 130ns 0 0 0 5.51 KB
#7887 StartStopWithChild netcoreapp3.1 15μs 54.8ns 212ns 0 0 0 5.7 KB
#7887 StartStopWithChild net472 22.7μs 120ns 646ns 0.887 0.332 0 5.94 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7887

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 3.33 KB 3.26 KB -64 B -1.92%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 1.26ms 82.7ns 287ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.39ms 153ns 593ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.72ms 266ns 958ns 0 0 0 3.33 KB
#7887 WriteAndFlushEnrichedTraces net6.0 1.26ms 161ns 624ns 0 0 0 2.7 KB
#7887 WriteAndFlushEnrichedTraces netcoreapp3.1 1.43ms 1.15μs 4.44μs 0 0 0 2.7 KB
#7887 WriteAndFlushEnrichedTraces net472 1.75ms 146ns 564ns 0 0 0 3.26 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 1.09μs 6.04ns 37.7ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.38μs 7.58ns 45.5ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.02μs 1.03ns 3.99ns 0.192 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.34μs 38.8ns 212ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 8.95μs 43.9ns 191ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.61μs 5.39ns 20.9ns 0.723 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 345ns 0.101ns 0.379ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 1.84ns 7.35ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 307ns 0.0376ns 0.146ns 0.0433 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.44μs 31.9ns 132ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.91μs 39.4ns 172ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.69μs 1.83ns 6.83ns 0.571 0 0 3.8 KB
#7887 AllCycleSimpleBody net6.0 1.11μs 0.405ns 1.52ns 0 0 0 1.22 KB
#7887 AllCycleSimpleBody netcoreapp3.1 1.39μs 7.92ns 56.6ns 0 0 0 1.2 KB
#7887 AllCycleSimpleBody net472 1.01μs 0.933ns 3.61ns 0.192 0 0 1.23 KB
#7887 AllCycleMoreComplexBody net6.0 7.36μs 34.3ns 137ns 0 0 0 4.72 KB
#7887 AllCycleMoreComplexBody netcoreapp3.1 9.03μs 42.3ns 169ns 0 0 0 4.62 KB
#7887 AllCycleMoreComplexBody net472 7.64μs 3.26ns 11.7ns 0.725 0 0 4.74 KB
#7887 ObjectExtractorSimpleBody net6.0 333ns 1.62ns 7.95ns 0 0 0 280 B
#7887 ObjectExtractorSimpleBody netcoreapp3.1 396ns 2.24ns 14.9ns 0 0 0 272 B
#7887 ObjectExtractorSimpleBody net472 312ns 0.122ns 0.471ns 0.0439 0 0 281 B
#7887 ObjectExtractorMoreComplexBody net6.0 6.38μs 32ns 147ns 0 0 0 3.79 KB
#7887 ObjectExtractorMoreComplexBody netcoreapp3.1 7.78μs 39.2ns 180ns 0 0 0 3.69 KB
#7887 ObjectExtractorMoreComplexBody net472 6.7μs 4.19ns 16.2ns 0.603 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 76.4μs 17.5ns 67.7ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.1μs 311ns 1.21μs 0 0 0 32.4 KB
master EncodeArgs net472 109μs 12.9ns 50ns 4.89 0 0 32.5 KB
master EncodeLegacyArgs net6.0 146μs 17.2ns 64.2ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 200μs 83.3ns 323ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 264μs 21.2ns 82ns 0 0 0 2.14 KB
#7887 EncodeArgs net6.0 75.3μs 43.2ns 150ns 0 0 0 32.4 KB
#7887 EncodeArgs netcoreapp3.1 97.6μs 214ns 831ns 0 0 0 32.4 KB
#7887 EncodeArgs net472 109μs 13.5ns 52.4ns 4.88 0 0 32.5 KB
#7887 EncodeLegacyArgs net6.0 148μs 10.4ns 36.1ns 0 0 0 2.14 KB
#7887 EncodeLegacyArgs netcoreapp3.1 198μs 40.1ns 139ns 0 0 0 2.14 KB
#7887 EncodeLegacyArgs net472 264μs 20.9ns 75.2ns 0 0 0 2.14 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 415μs 1.11μs 4.15μs 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 472μs 3.6μs 34.5μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 496μs 427ns 1.6μs 0 0 0 0 b
master RunWafRealisticBenchmarkWithAttack net6.0 306μs 1.27μs 4.58μs 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 353μs 3.58μs 35μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 364μs 233ns 841ns 0 0 0 0 b
#7887 RunWafRealisticBenchmark net6.0 420μs 629ns 2.27μs 0 0 0 4.55 KB
#7887 RunWafRealisticBenchmark netcoreapp3.1 456μs 3.67μs 34.8μs 0 0 0 4.48 KB
#7887 RunWafRealisticBenchmark net472 491μs 565ns 2.19μs 0 0 0 0 b
#7887 RunWafRealisticBenchmarkWithAttack net6.0 308μs 880ns 3.17μs 0 0 0 2.24 KB
#7887 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 342μs 2.95μs 27.8μs 0 0 0 2.22 KB
#7887 RunWafRealisticBenchmarkWithAttack net472 366μs 430ns 1.49μs 0 0 0 0 b
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 More allocations ⚠️

More allocations ⚠️ in #7887

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 21.18 KB 21.3 KB 116 B 0.55%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 85μs 91.8ns 343ns 0 0 0 18.97 KB
master SendRequest netcoreapp3.1 95.4μs 84.8ns 317ns 0 0 0 21.18 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#7887 SendRequest net6.0 84.3μs 223ns 1.24μs 0 0 0 18.98 KB
#7887 SendRequest netcoreapp3.1 97.2μs 266ns 1.62μs 0 0 0 21.3 KB
#7887 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7887

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 1.128 1,014,050.00 1,144,200.00

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.9ms 1.79μs 6.69μs 0 0 0 640 KB
master OriginalCharSlice netcoreapp3.1 3.86ms 897ns 3.47μs 0 0 0 640.05 KB
master OriginalCharSlice net472 2.67ms 578ns 2.08μs 0 0 0 638.98 KB
master OptimizedCharSlice net6.0 1.51ms 1.81μs 6.99μs 0 0 0 0 b
master OptimizedCharSlice netcoreapp3.1 2.88ms 307ns 1.06μs 0 0 0 0 b
master OptimizedCharSlice net472 1.9ms 715ns 2.77μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 1.01ms 732ns 2.74μs 0 0 0 0 b
master OptimizedCharSliceWithPool netcoreapp3.1 1.86ms 1.06μs 3.96μs 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.14ms 463ns 1.79μs 0 0 0 0 b
#7887 OriginalCharSlice net6.0 1.95ms 953ns 3.69μs 0 0 0 640 KB
#7887 OriginalCharSlice netcoreapp3.1 3.88ms 1.43μs 5.14μs 0 0 0 640.05 KB
#7887 OriginalCharSlice net472 2.65ms 590ns 2.21μs 0 0 0 638.98 KB
#7887 OptimizedCharSlice net6.0 1.48ms 419ns 1.57μs 0 0 0 0 b
#7887 OptimizedCharSlice netcoreapp3.1 2.73ms 531ns 2.06μs 0 0 0 0 b
#7887 OptimizedCharSlice net472 2.07ms 782ns 2.82μs 0 0 0 0 b
#7887 OptimizedCharSliceWithPool net6.0 1.15ms 1.53μs 5.92μs 0 0 0 0 b
#7887 OptimizedCharSliceWithPool netcoreapp3.1 1.89ms 1.98μs 7.65μs 0 0 0 0 b
#7887 OptimizedCharSliceWithPool net472 1.13ms 340ns 1.27μs 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7887

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.97 KB 41.76 KB -210 B -0.50%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 775μs 4.34μs 28.8μs 0 0 0 41.91 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 667μs 2.52μs 9.41μs 0 0 0 41.97 KB
master WriteAndFlushEnrichedTraces net472 984μs 4.55μs 17.6μs 4.81 0 0 56.02 KB
#7887 WriteAndFlushEnrichedTraces net6.0 719μs 1.83μs 7.1μs 0 0 0 41.8 KB
#7887 WriteAndFlushEnrichedTraces netcoreapp3.1 709μs 1.05μs 3.92μs 0 0 0 41.76 KB
#7887 WriteAndFlushEnrichedTraces net472 878μs 2.82μs 10.9μs 8.33 4.17 0 56.15 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.86μs 7.66ns 29.7ns 0 0 0 968 B
master ExecuteNonQuery netcoreapp3.1 2.64μs 6.1ns 23.6ns 0 0 0 960 B
master ExecuteNonQuery net472 2.74μs 2ns 7.74ns 0.135 0 0 931 B
#7887 ExecuteNonQuery net6.0 1.95μs 9.77ns 43.7ns 0 0 0 968 B
#7887 ExecuteNonQuery netcoreapp3.1 2.51μs 10.8ns 40.3ns 0 0 0 960 B
#7887 ExecuteNonQuery net472 2.7μs 2.3ns 8.61ns 0.136 0 0 931 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.75μs 3.64ns 14.1ns 0 0 0 952 B
master CallElasticsearch netcoreapp3.1 2.21μs 4.71ns 18.2ns 0 0 0 968 B
master CallElasticsearch net472 3.31μs 2.48ns 9.61ns 0.147 0 0 955 B
master CallElasticsearchAsync net6.0 1.72μs 0.562ns 1.95ns 0 0 0 928 B
master CallElasticsearchAsync netcoreapp3.1 2.34μs 11.6ns 47.8ns 0 0 0 1.02 KB
master CallElasticsearchAsync net472 3.48μs 0.818ns 3.06ns 0.157 0 0 1.01 KB
#7887 CallElasticsearch net6.0 1.77μs 0.668ns 2.32ns 0 0 0 952 B
#7887 CallElasticsearch netcoreapp3.1 2.09μs 6.58ns 25.5ns 0 0 0 968 B
#7887 CallElasticsearch net472 3.35μs 4.62ns 17.9ns 0.151 0 0 955 B
#7887 CallElasticsearchAsync net6.0 1.7μs 8.16ns 34.6ns 0 0 0 928 B
#7887 CallElasticsearchAsync netcoreapp3.1 2.37μs 6.44ns 23.2ns 0 0 0 1.02 KB
#7887 CallElasticsearchAsync net472 3.5μs 2.86ns 11.1ns 0.158 0 0 1.01 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.88μs 8.19ns 31.7ns 0 0 0 896 B
master ExecuteAsync netcoreapp3.1 2.42μs 4.12ns 15.4ns 0 0 0 896 B
master ExecuteAsync net472 2.51μs 1.34ns 5.18ns 0.125 0 0 859 B
#7887 ExecuteAsync net6.0 1.78μs 6.18ns 23.9ns 0 0 0 896 B
#7887 ExecuteAsync netcoreapp3.1 2.4μs 8.05ns 29ns 0 0 0 896 B
#7887 ExecuteAsync net472 2.56μs 1.09ns 4.23ns 0.127 0 0 858 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.78μs 17ns 61.4ns 0 0 0 2.29 KB
master SendAsync netcoreapp3.1 8.63μs 33.1ns 128ns 0 0 0 2.83 KB
master SendAsync net472 11.9μs 11.2ns 43.4ns 0.473 0 0 3.08 KB
#7887 SendAsync net6.0 6.61μs 12.4ns 47.9ns 0 0 0 2.29 KB
#7887 SendAsync netcoreapp3.1 8.51μs 18.7ns 72.3ns 0 0 0 2.83 KB
#7887 SendAsync net472 11.9μs 9.42ns 36.5ns 0.472 0 0 3.08 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7887

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 277.01 KB 280.5 KB 3.49 KB 1.26%

Fewer allocations 🎉 in #7887

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 273.92 KB 270.34 KB -3.58 KB -1.31%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 45.8μs 270ns 2.51μs 0 0 0 42.51 KB
master StringConcatBenchmark netcoreapp3.1 50.8μs 267ns 1.96μs 0 0 0 42.54 KB
master StringConcatBenchmark net472 57.6μs 123ns 444ns 0 0 0 49.15 KB
master StringConcatAspectBenchmark net6.0 528μs 2.13μs 7.38μs 0 0 0 273.98 KB
master StringConcatAspectBenchmark netcoreapp3.1 461μs 5.84μs 57.2μs 0 0 0 277.01 KB
master StringConcatAspectBenchmark net472 404μs 2.17μs 17.1μs 0 0 0 273.92 KB
#7887 StringConcatBenchmark net6.0 43.6μs 245ns 1.49μs 0 0 0 42.51 KB
#7887 StringConcatBenchmark netcoreapp3.1 49.8μs 266ns 1.79μs 0 0 0 42.54 KB
#7887 StringConcatBenchmark net472 58μs 136ns 471ns 0 0 0 49.15 KB
#7887 StringConcatAspectBenchmark net6.0 487μs 2.5μs 12μs 0 0 0 273.88 KB
#7887 StringConcatAspectBenchmark netcoreapp3.1 540μs 1.97μs 6.83μs 0 0 0 280.5 KB
#7887 StringConcatAspectBenchmark net472 391μs 1.6μs 5.77μs 0 0 0 270.34 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.66μs 13.6ns 51ns 0 0 0 1.69 KB
master EnrichedLog netcoreapp3.1 3.57μs 17ns 67.9ns 0 0 0 1.7 KB
master EnrichedLog net472 3.86μs 5.22ns 20.2ns 0.252 0 0 1.6 KB
#7887 EnrichedLog net6.0 2.7μs 12.7ns 50.8ns 0 0 0 1.69 KB
#7887 EnrichedLog netcoreapp3.1 3.51μs 14.2ns 55.2ns 0 0 0 1.7 KB
#7887 EnrichedLog net472 4μs 3.2ns 12.4ns 0.242 0 0 1.6 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 122μs 118ns 456ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 155ns 538ns 0 0 0 4.31 KB
master EnrichedLog net472 167μs 115ns 432ns 0 0 0 4.51 KB
#7887 EnrichedLog net6.0 123μs 75.3ns 271ns 0 0 0 4.31 KB
#7887 EnrichedLog netcoreapp3.1 129μs 236ns 913ns 0 0 0 4.31 KB
#7887 EnrichedLog net472 170μs 107ns 387ns 0 0 0 4.51 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 5.13μs 6.42ns 24.9ns 0 0 0 2.24 KB
master EnrichedLog netcoreapp3.1 6.93μs 24.4ns 94.6ns 0 0 0 2.26 KB
master EnrichedLog net472 7.57μs 9.37ns 36.3ns 0.302 0 0 2.05 KB
#7887 EnrichedLog net6.0 5.11μs 2.93ns 11.3ns 0 0 0 2.24 KB
#7887 EnrichedLog netcoreapp3.1 6.86μs 28.8ns 111ns 0 0 0 2.26 KB
#7887 EnrichedLog net472 7.56μs 4.82ns 18ns 0.302 0 0 2.05 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.96μs 10.1ns 49.4ns 0 0 0 1.12 KB
master SendReceive netcoreapp3.1 2.55μs 8ns 31ns 0 0 0 1.14 KB
master SendReceive net472 2.96μs 3.57ns 13.8ns 0.165 0 0 1.12 KB
#7887 SendReceive net6.0 1.92μs 0.609ns 2.36ns 0 0 0 1.12 KB
#7887 SendReceive netcoreapp3.1 2.47μs 8.24ns 31.9ns 0 0 0 1.14 KB
#7887 SendReceive net472 2.95μs 1.81ns 6.78ns 0.163 0 0 1.12 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.31μs 1.93ns 6.69ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.98μs 11.4ns 44.1ns 0 0 0 1.63 KB
master EnrichedLog net472 6.76μs 7.07ns 27.4ns 0.305 0 0 2.03 KB
#7887 EnrichedLog net6.0 4.48μs 13.1ns 50.8ns 0 0 0 1.58 KB
#7887 EnrichedLog netcoreapp3.1 5.84μs 14.5ns 54.2ns 0 0 0 1.63 KB
#7887 EnrichedLog net472 6.69μs 8.64ns 33.4ns 0.3 0 0 2.03 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 762ns 0.214ns 0.802ns 0 0 0 520 B
master StartFinishSpan netcoreapp3.1 948ns 5ns 26ns 0 0 0 520 B
master StartFinishSpan net472 885ns 0.0526ns 0.197ns 0.0798 0 0 522 B
master StartFinishScope net6.0 895ns 4.33ns 17.8ns 0 0 0 640 B
master StartFinishScope netcoreapp3.1 1.14μs 2.01ns 7.8ns 0 0 0 640 B
master StartFinishScope net472 1.07μs 0.203ns 0.787ns 0.091 0 0 602 B
master StartFinishTwoScopes net6.0 1.76μs 0.426ns 1.54ns 0 0 0 1.19 KB
master StartFinishTwoScopes netcoreapp3.1 2.2μs 11.3ns 50.4ns 0 0 0 1.19 KB
master StartFinishTwoScopes net472 2.12μs 0.826ns 3.2ns 0.17 0 0 1.08 KB
#7887 StartFinishSpan net6.0 784ns 3.25ns 12.6ns 0 0 0 520 B
#7887 StartFinishSpan netcoreapp3.1 946ns 5.03ns 25.1ns 0 0 0 520 B
#7887 StartFinishSpan net472 889ns 0.0826ns 0.32ns 0.0802 0 0 522 B
#7887 StartFinishScope net6.0 915ns 4.46ns 18.9ns 0 0 0 640 B
#7887 StartFinishScope netcoreapp3.1 1.15μs 5.15ns 19.3ns 0 0 0 640 B
#7887 StartFinishScope net472 1.07μs 0.264ns 0.952ns 0.0909 0 0 602 B
#7887 StartFinishTwoScopes net6.0 1.78μs 8.6ns 35.5ns 0 0 0 1.19 KB
#7887 StartFinishTwoScopes netcoreapp3.1 2.24μs 11.3ns 50.6ns 0 0 0 1.19 KB
#7887 StartFinishTwoScopes net472 2.11μs 0.59ns 2.13ns 0.168 0 0 1.08 KB
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.06μs 0.55ns 2.13ns 0 0 0 640 B
master RunOnMethodBegin netcoreapp3.1 1.37μs 6.78ns 28.8ns 0 0 0 640 B
master RunOnMethodBegin net472 1.38μs 0.741ns 2.77ns 0.0896 0 0 602 B
#7887 RunOnMethodBegin net6.0 1.1μs 5.4ns 23.6ns 0 0 0 640 B
#7887 RunOnMethodBegin netcoreapp3.1 1.32μs 0.761ns 2.95ns 0 0 0 640 B
#7887 RunOnMethodBegin net472 1.39μs 0.66ns 2.55ns 0.09 0 0 602 B

@andrewlock andrewlock merged commit 019dabb into master Dec 10, 2025
152 checks passed
@andrewlock andrewlock deleted the andrew/tags branch December 10, 2025 15:57
@github-actions github-actions bot added this to the vNext-v3 milestone Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:performance Performance, speed, latency, resource usage (CPU, memory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants