Skip to content

Add more cleanup to benchmarks#7865

Merged
andrewlock merged 6 commits intomasterfrom
andrew/perf/1-benchmark-tweaks
Dec 1, 2025
Merged

Add more cleanup to benchmarks#7865
andrewlock merged 6 commits intomasterfrom
andrew/perf/1-benchmark-tweaks

Conversation

@andrewlock
Copy link
Member

@andrewlock andrewlock commented Nov 26, 2025

Summary of changes

  • Update the JetBrains SelfApi package to latest version
  • Don't run background tasks like remote config, telemetry, discovery service in benchmarks
  • Cleanup "global" tracers after benchmark

Reason for change

Benchmarks should be isolated to keep them consistent, but unfortunately a lot of our code has Tracer.Instance and Security.Instance scattered around. That means we need to set up global state for some of the benchmarks. Currently, we're never cleaning up that global state, which could introduce variance (flake) in the benchmarks).

Note that this actually doesn't impact us in most cases, only when using the inprocess tool chain, which is primarily used for when we're using dotmemory etc locally

Similarly, new Tracer instances start a bunch of background tasks, such as remote configuration, telemetry, discovery service. These all have the possibility of skewing results and introducing flake.

Implementation details

  • Cleanup any resources (e.g. Tracer instances, but anything disposable) in [GlobalCleanup]
  • Ensure we remove and replace the global Tracer instances in cleanup
  • Disable services that start background jobs (discovery service, telemetry, remote config)
  • Create a helper for creating a tracer with default benchmarking configuration

Test coverage

This is the test - we may see some variation from the current results, but hopefully the results will be more stable subsequently

Other details

I wish we could not use Tracer.Instance (or Security.Instance, or Iast.Instance) at all. It would make all of this much easier to reason about and reduce the chance of accidental cross-talk. That's something we'll move towards slowly, for now this is probably the best we can do.

@andrewlock andrewlock added the area:benchmarks Benchmarks, throughput tests, Crank, Bombardier, etc label Nov 26, 2025
@andrewlock andrewlock requested review from a team as code owners November 26, 2025 08:04
@github-actions github-actions bot added the area:tests unit tests, integration tests label Nov 26, 2025
@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Nov 26, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7865) 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
duration76.25 ± (76.65 - 77.50) ms75.11 ± (74.77 - 75.46) ms-1.5%
.NET Framework 4.8 - Bailout
duration81.32 ± (81.45 - 82.54) ms79.69 ± (79.54 - 80.32) ms-2.0%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1064.14 ± (1065.08 - 1074.60) ms1062.13 ± (1064.20 - 1074.75) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms23.18 ± (23.11 - 23.25) ms23.17 ± (23.09 - 23.25) ms-0.0%
process.time_to_main_ms88.73 ± (88.27 - 89.19) ms88.85 ± (88.42 - 89.28) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.92) MB10.91 ± (10.91 - 10.91) MB-0.0%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.04 ± (22.96 - 23.12) ms22.98 ± (22.92 - 23.05) ms-0.2%
process.time_to_main_ms89.42 ± (88.98 - 89.86) ms90.47 ± (89.98 - 90.95) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.95 - 10.95) MB10.96 ± (10.96 - 10.96) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms223.31 ± (222.03 - 224.59) ms222.77 ± (221.32 - 224.21) ms-0.2%
process.time_to_main_ms506.16 ± (504.69 - 507.64) ms503.31 ± (501.77 - 504.84) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.88 ± (47.86 - 47.90) MB47.93 ± (47.91 - 47.95) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 6 - Baseline
process.internal_duration_ms22.03 ± (21.94 - 22.12) ms21.96 ± (21.87 - 22.05) ms-0.3%
process.time_to_main_ms76.90 ± (76.48 - 77.33) ms77.51 ± (77.06 - 77.95) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.62) MB10.63 ± (10.63 - 10.63) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.88 ± (21.80 - 21.97) ms22.03 ± (21.95 - 22.11) ms+0.7%✅⬆️
process.time_to_main_ms77.71 ± (77.30 - 78.11) ms79.01 ± (78.57 - 79.44) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.68 ± (10.68 - 10.69) MB10.66 ± (10.66 - 10.67) MB-0.2%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.05 ± (210.89 - 213.21) ms214.29 ± (213.07 - 215.50) ms+1.1%✅⬆️
process.time_to_main_ms471.34 ± (470.07 - 472.61) ms473.19 ± (471.84 - 474.53) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.15 ± (48.13 - 48.18) MB48.09 ± (48.07 - 48.11) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms20.12 ± (20.05 - 20.20) ms20.08 ± (19.99 - 20.17) ms-0.2%
process.time_to_main_ms76.46 ± (76.05 - 76.88) ms75.84 ± (75.42 - 76.26) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.65 - 7.67) MB7.65 ± (7.64 - 7.66) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.89 ± (19.82 - 19.97) ms20.03 ± (19.96 - 20.10) ms+0.7%✅⬆️
process.time_to_main_ms76.33 ± (75.92 - 76.74) ms77.58 ± (77.21 - 77.95) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.68 - 7.69) MB7.70 ± (7.69 - 7.71) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms192.84 ± (191.72 - 193.96) ms192.35 ± (191.25 - 193.45) ms-0.3%
process.time_to_main_ms457.40 ± (456.22 - 458.57) ms461.40 ± (460.00 - 462.80) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.38 ± (36.34 - 36.42) MB36.45 ± (36.40 - 36.49) MB+0.2%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.2%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration211.50 ± (211.04 - 212.20) ms193.50 ± (193.21 - 194.05) ms-8.5%
.NET Framework 4.8 - Bailout
duration212.78 ± (212.40 - 213.49) ms196.89 ± (196.64 - 197.14) ms-7.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1122.88 ± (1129.41 - 1141.62) ms1120.52 ± (1125.24 - 1134.93) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms188.43 ± (187.99 - 188.86) ms188.76 ± (188.43 - 189.08) ms+0.2%✅⬆️
process.time_to_main_ms80.87 ± (80.66 - 81.08) ms80.90 ± (80.69 - 81.11) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.06 - 16.12) MB16.04 ± (16.02 - 16.06) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-1.1%
.NET Core 3.1 - Bailout
process.internal_duration_ms186.88 ± (186.63 - 187.13) ms187.30 ± (187.06 - 187.54) ms+0.2%✅⬆️
process.time_to_main_ms81.86 ± (81.71 - 82.01) ms82.02 ± (81.90 - 82.13) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.08 - 16.14) MB16.14 ± (16.12 - 16.16) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.5%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms402.23 ± (399.43 - 405.03) ms395.89 ± (393.54 - 398.23) ms-1.6%
process.time_to_main_ms471.49 ± (470.84 - 472.14) ms473.05 ± (472.36 - 473.73) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.69 ± (58.56 - 58.82) MB58.64 ± (58.51 - 58.77) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms191.68 ± (191.35 - 192.01) ms193.21 ± (192.91 - 193.50) ms+0.8%✅⬆️
process.time_to_main_ms69.96 ± (69.82 - 70.10) ms70.76 ± (70.58 - 70.93) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.27 ± (16.14 - 16.39) MB16.27 ± (16.16 - 16.38) MB+0.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.3%
.NET 6 - Bailout
process.internal_duration_ms191.45 ± (191.08 - 191.82) ms191.70 ± (191.40 - 192.00) ms+0.1%✅⬆️
process.time_to_main_ms71.12 ± (70.99 - 71.25) ms71.15 ± (71.05 - 71.25) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.29 ± (16.16 - 16.41) MB16.40 ± (16.31 - 16.48) MB+0.7%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 20)20 ± (20 - 20)+2.3%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms405.05 ± (403.23 - 406.87) ms406.67 ± (404.81 - 408.53) ms+0.4%✅⬆️
process.time_to_main_ms440.55 ± (439.97 - 441.14) ms442.55 ± (442.00 - 443.10) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.94 ± (58.80 - 59.09) MB59.05 ± (58.92 - 59.19) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 30)30 ± (29 - 30)+0.2%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms189.85 ± (189.60 - 190.10) ms192.21 ± (191.81 - 192.61) ms+1.2%✅⬆️
process.time_to_main_ms69.49 ± (69.33 - 69.64) ms70.17 ± (69.95 - 70.39) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.78) MB11.76 ± (11.74 - 11.78) MB-0.0%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.0%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.38 ± (189.10 - 189.66) ms189.88 ± (189.63 - 190.12) ms+0.3%✅⬆️
process.time_to_main_ms70.50 ± (70.39 - 70.60) ms70.49 ± (70.38 - 70.60) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.79 ± (11.76 - 11.82) MB11.83 ± (11.80 - 11.86) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.1%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms364.66 ± (363.27 - 366.04) ms366.73 ± (365.15 - 368.31) ms+0.6%✅⬆️
process.time_to_main_ms428.36 ± (427.76 - 428.97) ms430.97 ± (430.28 - 431.66) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.92 ± (47.89 - 47.95) MB47.92 ± (47.89 - 47.96) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%
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 (7865) - mean (75ms)  : 71, 79
    master - mean (77ms)  : 71, 83

    section Bailout
    This PR (7865) - mean (80ms)  : 74, 85
    master - mean (82ms)  : 74, 90

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (1,069ms)  : 991, 1148
    master - mean (1,070ms)  : 1001, 1138

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 (7865) - mean (120ms)  : 111, 128
    master - mean (119ms)  : 110, 129

    section Bailout
    This PR (7865) - mean (121ms)  : 113, 129
    master - mean (120ms)  : 111, 129

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (764ms)  : 722, 806
    master - mean (767ms)  : 731, 803

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7865) - mean (107ms)  : 98, 116
    master - mean (106ms)  : 99, 114

    section Bailout
    This PR (7865) - mean (108ms)  : 100, 115
    master - mean (107ms)  : 98, 116

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (716ms)  : 683, 748
    master - mean (712ms)  : 677, 747

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7865) - mean (105ms)  : 94, 116
    master - mean (105ms)  : 96, 114

    section Bailout
    This PR (7865) - mean (106ms)  : 99, 113
    master - mean (105ms)  : 96, 114

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (688ms)  : 650, 726
    master - mean (685ms)  : 647, 722

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 (7865) - mean (194ms)  : 190, 198
    master - mean (212ms)  : 203, 220

    section Bailout
    This PR (7865) - mean (197ms)  : 194, 199
    master - mean (213ms)  : 206, 220

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (1,130ms)  : 1060, 1200
    master - mean (1,136ms)  : 1048, 1223

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 (7865) - mean (278ms)  : 270, 285
    master - mean (278ms)  : 272, 284

    section Bailout
    This PR (7865) - mean (278ms)  : 274, 281
    master - mean (277ms)  : 273, 281

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (906ms)  : 864, 948
    master - mean (910ms)  : 867, 953

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

    section Bailout
    This PR (7865) - mean (271ms)  : 268, 274
    master - mean (271ms)  : 267, 275

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (881ms)  : 848, 915
    master - mean (880ms)  : 840, 919

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7865) - mean (271ms)  : 266, 277
    master - mean (269ms)  : 265, 273

    section Bailout
    This PR (7865) - mean (270ms)  : 267, 273
    master - mean (269ms)  : 266, 273

    section CallTarget+Inlining+NGEN
    This PR (7865) - mean (829ms)  : 809, 848
    master - mean (823ms)  : 796, 850

Loading

@pr-commenter
Copy link

pr-commenter bot commented Nov 26, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7865 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.216
  • 3 benchmarks are slower, with geometric mean 1.457
  • 30 benchmarks have fewer allocations
  • 5 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 ✔️ More allocations ⚠️

More allocations ⚠️ in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 5.41 KB 5.5 KB 93 B 1.72%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.67 KB 5.7 KB 33 B 0.58%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 60.6ns 407ns 0 0 0 5.41 KB
master StartStopWithChild netcoreapp3.1 14.5μs 75.9ns 364ns 0 0 0 5.67 KB
master StartStopWithChild net472 21.7μs 82.5ns 330ns 0.983 0.328 0.109 6.09 KB
#7865 StartStopWithChild net6.0 11.7μs 62.8ns 338ns 0 0 0 5.5 KB
#7865 StartStopWithChild netcoreapp3.1 13.4μs 70ns 343ns 0 0 0 5.7 KB
#7865 StartStopWithChild net472 22.6μs 125ns 798ns 1.07 0.32 0.107 6.06 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 2.71 KB 2.7 KB -14 B -0.52%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 1.28ms 300ns 1.16μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.37ms 2.49μs 9.65μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.8ms 216ns 750ns 17.9 0 0 115.64 KB
#7865 WriteAndFlushEnrichedTraces net6.0 1.25ms 143ns 553ns 0 0 0 2.7 KB
#7865 WriteAndFlushEnrichedTraces netcoreapp3.1 1.36ms 95.5ns 370ns 0 0 0 2.7 KB
#7865 WriteAndFlushEnrichedTraces net472 1.78ms 1.32μs 5.1μs 17.9 0 0 115.57 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.07μs 4.65ns 17.4ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.4μs 7.8ns 48.1ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.06μs 0.203ns 0.785ns 0.19 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.1μs 34ns 132ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 8.97μs 44.8ns 190ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.59μs 4.18ns 15.6ns 0.721 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 331ns 1.6ns 6.4ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 392ns 2.22ns 14.6ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 304ns 0.454ns 1.76ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.39μs 29.6ns 118ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.79μs 36.4ns 150ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.64μs 3.25ns 12.6ns 0.597 0 0 3.8 KB
#7865 AllCycleSimpleBody net6.0 1.1μs 6.1ns 39ns 0 0 0 1.22 KB
#7865 AllCycleSimpleBody netcoreapp3.1 1.4μs 7.91ns 53.7ns 0 0 0 1.2 KB
#7865 AllCycleSimpleBody net472 1.06μs 0.867ns 3.36ns 0.191 0 0 1.23 KB
#7865 AllCycleMoreComplexBody net6.0 7.12μs 38.6ns 218ns 0 0 0 4.72 KB
#7865 AllCycleMoreComplexBody netcoreapp3.1 9.06μs 48.2ns 251ns 0 0 0 4.62 KB
#7865 AllCycleMoreComplexBody net472 7.7μs 3.65ns 13.7ns 0.733 0 0 4.74 KB
#7865 ObjectExtractorSimpleBody net6.0 323ns 0.0815ns 0.282ns 0 0 0 280 B
#7865 ObjectExtractorSimpleBody netcoreapp3.1 398ns 1.96ns 7.83ns 0 0 0 272 B
#7865 ObjectExtractorSimpleBody net472 297ns 0.0209ns 0.0782ns 0.0434 0 0 281 B
#7865 ObjectExtractorMoreComplexBody net6.0 6.42μs 30.5ns 130ns 0 0 0 3.78 KB
#7865 ObjectExtractorMoreComplexBody netcoreapp3.1 7.8μs 39.1ns 175ns 0 0 0 3.69 KB
#7865 ObjectExtractorMoreComplexBody net472 6.87μs 3.15ns 12.2ns 0.583 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 2.16 KB 2.14 KB -11 B -0.51%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 76.6μs 249ns 964ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.8μs 201ns 777ns 0 0 0 32.4 KB
master EncodeArgs net472 110μs 6.24ns 21.6ns 4.96 0 0 32.51 KB
master EncodeLegacyArgs net6.0 146μs 64.8ns 234ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 199μs 240ns 931ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 264μs 198ns 713ns 0 0 0 2.16 KB
#7865 EncodeArgs net6.0 78.4μs 241ns 933ns 0 0 0 32.4 KB
#7865 EncodeArgs netcoreapp3.1 96.9μs 333ns 1.29μs 0 0 0 32.4 KB
#7865 EncodeArgs net472 109μs 10ns 37.6ns 4.89 0 0 32.5 KB
#7865 EncodeLegacyArgs net6.0 146μs 13ns 48.8ns 0 0 0 2.14 KB
#7865 EncodeLegacyArgs netcoreapp3.1 197μs 261ns 1.01μs 0 0 0 2.14 KB
#7865 EncodeLegacyArgs net472 263μs 27.2ns 105ns 0 0 0 2.14 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 4.58 KB 4.48 KB -104 B -2.27%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.32 KB 2.22 KB -104 B -4.48%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 5.82 KB 4.55 KB -1.26 KB -21.73%
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 3.17 KB 2.24 KB -928 B -29.29%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 425μs 648ns 2.34μs 0 0 0 5.82 KB
master RunWafRealisticBenchmark netcoreapp3.1 473μs 2.91μs 27.6μs 0 0 0 4.58 KB
master RunWafRealisticBenchmark net472 497μs 732ns 2.83μs 0 0 0 0 b
master RunWafRealisticBenchmarkWithAttack net6.0 316μs 1.19μs 4.28μs 0 0 0 3.17 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 359μs 3.06μs 29μs 0 0 0 2.32 KB
master RunWafRealisticBenchmarkWithAttack net472 372μs 505ns 1.89μs 0 0 0 0 b
#7865 RunWafRealisticBenchmark net6.0 423μs 1.38μs 4.78μs 0 0 0 4.55 KB
#7865 RunWafRealisticBenchmark netcoreapp3.1 467μs 3.25μs 30.7μs 0 0 0 4.48 KB
#7865 RunWafRealisticBenchmark net472 497μs 429ns 1.55μs 0 0 0 0 b
#7865 RunWafRealisticBenchmarkWithAttack net6.0 315μs 589ns 2.12μs 0 0 0 2.24 KB
#7865 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 335μs 1.69μs 7.55μs 0 0 0 2.22 KB
#7865 RunWafRealisticBenchmarkWithAttack net472 372μs 351ns 1.26μs 0 0 0 0 b
Benchmarks.Trace.AspNetCoreBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7865

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 1.402 60,146.33 84,321.96
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 1.363 72,526.47 98,829.42

More allocations ⚠️ in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 14.52 KB 19.03 KB 4.51 KB 31.07%
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 17.42 KB 21.25 KB 3.83 KB 22.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 60.1μs 58.7ns 227ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 72.5μs 118ns 407ns 0 0 0 17.42 KB
master SendRequest net472 0.158ns 0.00432ns 0.0167ns 0 0 0 0 b
#7865 SendRequest net6.0 84.5μs 121ns 435ns 0 0 0 19.03 KB
#7865 SendRequest netcoreapp3.1 98.5μs 447ns 1.79μs 0 0 0 21.25 KB
#7865 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Fewer allocations 🎉

Slower ⚠️ in #7865

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 1.619 1,705,800.00 2,762,000.00

Faster 🎉 in #7865

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 1.202 1,368,600.00 1,138,900.00

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice‑net472 647.17 KB 638.98 KB -8.19 KB -1.27%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 640 B 0 b -640 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑netcoreapp3.1 104 B 0 b -104 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 640 B 0 b -640 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 104 B 0 b -104 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.94ms 1.22μs 4.57μs 0 0 0 640.64 KB
master OriginalCharSlice netcoreapp3.1 4.1ms 2.12μs 8.22μs 0 0 0 640.1 KB
master OriginalCharSlice net472 2.63ms 958ns 3.71μs 0 0 0 647.17 KB
master OptimizedCharSlice net6.0 1.52ms 376ns 1.41μs 0 0 0 640 B
master OptimizedCharSlice netcoreapp3.1 1.71ms 5.66μs 35.8μs 0 0 0 104 B
master OptimizedCharSlice net472 1.94ms 593ns 2.3μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 1.05ms 588ns 2.2μs 0 0 0 640 B
master OptimizedCharSliceWithPool netcoreapp3.1 1.86ms 1.95μs 7.56μs 0 0 0 104 B
master OptimizedCharSliceWithPool net472 1.37ms 1.35μs 5.23μs 0 0 0 0 b
#7865 OriginalCharSlice net6.0 1.93ms 1.04μs 3.76μs 0 0 0 640 KB
#7865 OriginalCharSlice netcoreapp3.1 3.94ms 1.08μs 4.02μs 0 0 0 640.05 KB
#7865 OriginalCharSlice net472 2.73ms 716ns 2.68μs 0 0 0 638.98 KB
#7865 OptimizedCharSlice net6.0 1.53ms 254ns 951ns 0 0 0 0 b
#7865 OptimizedCharSlice netcoreapp3.1 2.76ms 1.23μs 4.78μs 0 0 0 0 b
#7865 OptimizedCharSlice net472 2.06ms 1.23μs 4.6μs 0 0 0 0 b
#7865 OptimizedCharSliceWithPool net6.0 1.02ms 647ns 2.5μs 0 0 0 0 b
#7865 OptimizedCharSliceWithPool netcoreapp3.1 1.87ms 1.61μs 6.22μs 0 0 0 0 b
#7865 OptimizedCharSliceWithPool net472 1.14ms 280ns 1.01μs 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7865

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.160 955,999.52 823,787.05

More allocations ⚠️ in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 55.79 KB 56.11 KB 327 B 0.59%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 665μs 451ns 1.75μs 0 0 0 41.67 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 722μs 979ns 3.79μs 0 0 0 41.9 KB
master WriteAndFlushEnrichedTraces net472 958μs 4.64μs 18.6μs 4.81 0 0 55.79 KB
#7865 WriteAndFlushEnrichedTraces net6.0 649μs 703ns 2.54μs 0 0 0 41.76 KB
#7865 WriteAndFlushEnrichedTraces netcoreapp3.1 697μs 4.06μs 37.2μs 0 0 0 41.82 KB
#7865 WriteAndFlushEnrichedTraces net472 825μs 2.61μs 9.76μs 4.46 0 0 56.11 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.91μs 8.99ns 35.9ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.63μs 2.44ns 9.44ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.72μs 1.02ns 3.69ns 0.152 0 0 987 B
#7865 ExecuteNonQuery net6.0 1.96μs 6.99ns 27.1ns 0 0 0 1.02 KB
#7865 ExecuteNonQuery netcoreapp3.1 2.74μs 8.62ns 33.4ns 0 0 0 1.02 KB
#7865 ExecuteNonQuery net472 2.85μs 1.95ns 7.53ns 0.154 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1 1.08 KB 1.07 KB -8 B -0.74%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1 1.03 KB 1.02 KB -8 B -0.78%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.03 KB 1.01 KB -24 B -2.33%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.01 KB 984 B -24 B -2.38%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 1.1 KB 1.07 KB -32 B -2.91%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472 1.04 KB 1.01 KB -32 B -3.07%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.72μs 8.72ns 40.9ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.37μs 8.9ns 32.1ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.45μs 3.03ns 11.7ns 0.156 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.78μs 6.89ns 26.7ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.48μs 10.5ns 40.8ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.67μs 4.49ns 17.4ns 0.167 0 0 1.1 KB
#7865 CallElasticsearch net6.0 1.76μs 0.733ns 2.64ns 0 0 0 1.01 KB
#7865 CallElasticsearch netcoreapp3.1 2.29μs 9.03ns 35ns 0 0 0 1.02 KB
#7865 CallElasticsearch net472 3.43μs 4.74ns 18.4ns 0.154 0 0 1.01 KB
#7865 CallElasticsearchAsync net6.0 1.77μs 8.56ns 35.3ns 0 0 0 984 B
#7865 CallElasticsearchAsync netcoreapp3.1 2.41μs 9.4ns 35.2ns 0 0 0 1.07 KB
#7865 CallElasticsearchAsync net472 3.63μs 3.37ns 13.1ns 0.162 0 0 1.07 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.92μs 9.55ns 39.4ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.47μs 6.9ns 26.7ns 0 0 0 952 B
master ExecuteAsync net472 2.59μs 0.737ns 2.66ns 0.143 0 0 915 B
#7865 ExecuteAsync net6.0 1.89μs 8.46ns 32.7ns 0 0 0 952 B
#7865 ExecuteAsync netcoreapp3.1 2.45μs 2.03ns 7.59ns 0 0 0 952 B
#7865 ExecuteAsync net472 2.64μs 4.61ns 17.8ns 0.134 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net6.0 2.36 KB 2.34 KB -16 B -0.68%
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472 3.18 KB 3.14 KB -41 B -1.29%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.9μs 7.53ns 27.1ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.76μs 29.7ns 115ns 0 0 0 2.9 KB
master SendAsync net472 12.1μs 18.2ns 70.5ns 0.481 0 0 3.18 KB
#7865 SendAsync net6.0 6.92μs 24.8ns 92.8ns 0 0 0 2.34 KB
#7865 SendAsync netcoreapp3.1 8.36μs 28.9ns 112ns 0 0 0 2.89 KB
#7865 SendAsync net472 12.3μs 17ns 66ns 0.491 0 0 3.14 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 Fewer allocations 🎉

Faster 🎉 in #7865

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 1.289 570,300.00 442,550.00 bimodal

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 278.32 KB 274.01 KB -4.31 KB -1.55%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 270.34 KB -8.19 KB -2.94%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 44.13 KB 42.51 KB -1.62 KB -3.66%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 57.34 KB 49.15 KB -8.19 KB -14.29%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 46.2μs 332ns 3.12μs 0 0 0 44.13 KB
master StringConcatBenchmark netcoreapp3.1 51.5μs 420ns 4.01μs 0 0 0 42.68 KB
master StringConcatBenchmark net472 57.8μs 167ns 601ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 483μs 2.07μs 9.27μs 0 0 0 277.02 KB
master StringConcatAspectBenchmark netcoreapp3.1 572μs 2.12μs 7.65μs 0 0 0 278.32 KB
master StringConcatAspectBenchmark net472 409μs 2.26μs 16μs 0 0 0 278.53 KB
#7865 StringConcatBenchmark net6.0 44.9μs 260ns 1.98μs 0 0 0 42.51 KB
#7865 StringConcatBenchmark netcoreapp3.1 51.4μs 296ns 2.25μs 0 0 0 42.54 KB
#7865 StringConcatBenchmark net472 57.8μs 110ns 381ns 0 0 0 49.15 KB
#7865 StringConcatAspectBenchmark net6.0 498μs 2.54μs 11.4μs 0 0 0 275.88 KB
#7865 StringConcatAspectBenchmark netcoreapp3.1 460μs 6.98μs 69.1μs 0 0 0 274.01 KB
#7865 StringConcatAspectBenchmark net472 402μs 1.93μs 7.94μs 0 0 0 270.34 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.7 KB 1.69 KB -16 B -0.94%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 1.64 KB 1.6 KB -36 B -2.20%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.65μs 14.5ns 84.8ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.57μs 16.9ns 69.7ns 0 0 0 1.7 KB
master EnrichedLog net472 3.91μs 2.7ns 10.1ns 0.254 0 0 1.64 KB
#7865 EnrichedLog net6.0 2.71μs 13.8ns 61.7ns 0 0 0 1.69 KB
#7865 EnrichedLog netcoreapp3.1 3.51μs 16.1ns 64.5ns 0 0 0 1.7 KB
#7865 EnrichedLog net472 3.83μs 5.15ns 20ns 0.248 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 125μs 464ns 1.8μs 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 128μs 431ns 1.67μs 0 0 0 4.31 KB
master EnrichedLog net472 167μs 109ns 409ns 0 0 0 4.52 KB
#7865 EnrichedLog net6.0 125μs 151ns 544ns 0 0 0 4.31 KB
#7865 EnrichedLog netcoreapp3.1 130μs 235ns 814ns 0 0 0 4.31 KB
#7865 EnrichedLog net472 167μs 134ns 518ns 0 0 0 4.51 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0 2.26 KB 2.24 KB -20 B -0.88%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 2.08 KB 2.05 KB -33 B -1.59%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 5.07μs 15.9ns 57.2ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.95μs 19.8ns 76.5ns 0 0 0 2.26 KB
master EnrichedLog net472 7.69μs 10.7ns 41.6ns 0.307 0 0 2.08 KB
#7865 EnrichedLog net6.0 5.14μs 16.6ns 64.2ns 0 0 0 2.24 KB
#7865 EnrichedLog netcoreapp3.1 6.79μs 29.2ns 113ns 0 0 0 2.26 KB
#7865 EnrichedLog net472 7.7μs 5.81ns 22.5ns 0.309 0 0 2.05 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7865

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1 1.2 KB 1.19 KB -8 B -0.67%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 1.2 KB 1.18 KB -24 B -2.00%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 1.2 KB 1.17 KB -33 B -2.74%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 2.02μs 10.9ns 58.7ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.59μs 11.8ns 45.6ns 0 0 0 1.2 KB
master SendReceive net472 3.1μs 0.789ns 3.05ns 0.188 0 0 1.2 KB
#7865 SendReceive net6.0 1.96μs 10.1ns 47.3ns 0 0 0 1.18 KB
#7865 SendReceive netcoreapp3.1 2.61μs 13.3ns 58ns 0 0 0 1.19 KB
#7865 SendReceive net472 3.03μs 3.79ns 14.7ns 0.181 0 0 1.17 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.32μs 8.14ns 31.5ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.75μs 18.7ns 72.6ns 0 0 0 1.63 KB
master EnrichedLog net472 6.51μs 6.34ns 24.5ns 0.292 0 0 2.03 KB
#7865 EnrichedLog net6.0 4.56μs 5.41ns 20.9ns 0 0 0 1.58 KB
#7865 EnrichedLog netcoreapp3.1 5.53μs 20.4ns 79.2ns 0 0 0 1.63 KB
#7865 EnrichedLog net472 6.62μs 4.24ns 15.9ns 0.296 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 805ns 2.44ns 9.44ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 966ns 5.11ns 27.5ns 0 0 0 576 B
master StartFinishSpan net472 907ns 0.135ns 0.504ns 0.0906 0 0 578 B
master StartFinishScope net6.0 985ns 0.814ns 3.04ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.14μs 5.96ns 28.6ns 0 0 0 696 B
master StartFinishScope net472 1.12μs 0.0802ns 0.311ns 0.101 0 0 658 B
master StartFinishTwoScopes net6.0 1.78μs 0.275ns 1.06ns 0 0 0 1.19 KB
master StartFinishTwoScopes netcoreapp3.1 2.19μs 11.9ns 64ns 0 0 0 1.19 KB
master StartFinishTwoScopes net472 2.19μs 3.39ns 13.1ns 0.163 0 0 1.08 KB
#7865 StartFinishSpan net6.0 846ns 0.238ns 0.921ns 0 0 0 576 B
#7865 StartFinishSpan netcoreapp3.1 981ns 5.29ns 29ns 0 0 0 576 B
#7865 StartFinishSpan net472 903ns 0.0952ns 0.343ns 0.0905 0 0 578 B
#7865 StartFinishScope net6.0 933ns 5.08ns 29.2ns 0 0 0 696 B
#7865 StartFinishScope netcoreapp3.1 1.16μs 1.6ns 6.2ns 0 0 0 696 B
#7865 StartFinishScope net472 1.12μs 0.788ns 3.05ns 0.101 0 0 658 B
#7865 StartFinishTwoScopes net6.0 1.87μs 8.78ns 36.2ns 0 0 0 1.19 KB
#7865 StartFinishTwoScopes netcoreapp3.1 2.24μs 10.5ns 44.8ns 0 0 0 1.19 KB
#7865 StartFinishTwoScopes net472 2.12μs 0.792ns 3.07ns 0.17 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.08μs 0.608ns 2.35ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.5μs 4.56ns 17.1ns 0 0 0 696 B
master RunOnMethodBegin net472 1.43μs 0.324ns 1.21ns 0.101 0 0 658 B
#7865 RunOnMethodBegin net6.0 1.07μs 1.53ns 5.93ns 0 0 0 696 B
#7865 RunOnMethodBegin netcoreapp3.1 1.44μs 4.49ns 17.4ns 0 0 0 696 B
#7865 RunOnMethodBegin net472 1.46μs 0.524ns 2.03ns 0.102 0 0 658 B

@datadog-official
Copy link

datadog-official bot commented Nov 26, 2025

⚠️ Tests

⚠️ Warnings

🧪 1 Test failed

SubmitsTraces from Datadog.Trace.ClrProfiler.IntegrationTests.AdoNet.NpgsqlCommandTests (Datadog)
Expected exit code: 0, actual exit code: 134. Message: Unhandled exception. Npgsql.NpgsqlException (0x80004005): The operation has timed out
 ---> System.TimeoutException: The operation has timed out.
   at Npgsql.ThrowHelper.ThrowNpgsqlExceptionWithInnerTimeoutException(String message)
   at Npgsql.Util.NpgsqlTimeout.Check()
   at Npgsql.Util.NpgsqlTimeout.CheckAndGetTimeLeft()
   at Npgsql.Internal.NpgsqlConnector.Connect(NpgsqlTimeout timeout)
   at Npgsql.Internal.NpgsqlConnector.RawOpen(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|209_0(NpgsqlConnector conn, String username, SslMode sslMode, GssEncryptionMode gssEncMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|209_0(NpgsqlConnector conn, String username, SslMode sslMode, GssEncryptionMode gssEncMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
...

ℹ️ Info

❄️ No new flaky tests detected

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

Copy link
Collaborator

@NachoEchevarria NachoEchevarria left a comment

Choose a reason for hiding this comment

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

Nice. Thanks!

@andrewlock andrewlock force-pushed the andrew/perf/1-benchmark-tweaks branch from 4df9ff3 to 49536f1 Compare December 1, 2025 18:28
@andrewlock andrewlock enabled auto-merge (squash) December 1, 2025 18:29
@andrewlock andrewlock merged commit 09f5589 into master Dec 1, 2025
150 of 151 checks passed
@andrewlock andrewlock deleted the andrew/perf/1-benchmark-tweaks branch December 1, 2025 20:32
@github-actions github-actions bot added this to the vNext-v3 milestone Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:benchmarks Benchmarks, throughput tests, Crank, Bombardier, etc area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants