Skip to content

Conversation

daniel-romano-DD
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD commented Sep 2, 2025

Summary of changes

After converting the creation of Dataflow to dynamic, when adding it to the rejiters vector, this could cause a race condition when it grows. So, in order to avoid this, the rejitters vector has been converted to a fixed array.

As there are 3 known rejitters, ATM, the size of the array has been set to 4 to have a minimal buffer.

Reason for change

Previous vector reserve implementation could be unsafe if a new rejitter was added without modifying the reserved size. This way if a new one is added without modifying the max count, an exception will be thrown

Implementation details

Replace the previous rejitters vector with a fixed array.

Test coverage

Unit tests have been added for the array insert function

Other details

@daniel-romano-DD daniel-romano-DD added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) area:asm area:debugger labels Sep 2, 2025
@daniel-romano-DD daniel-romano-DD marked this pull request as ready for review September 2, 2025 14:59
@daniel-romano-DD daniel-romano-DD requested review from a team as code owners September 2, 2025 14:59
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

Thanks!

@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Sep 2, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (73ms)  : 72, 75
     .   : milestone, 73,
    master - mean (73ms)  : 72, 75
     .   : milestone, 73,

    section Baseline
    This PR (7460) - mean (70ms)  : 65, 76
     .   : milestone, 70,
    master - mean (70ms)  : 64, 76
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (995ms)  : 965, 1025
     .   : milestone, 995,
    master - mean (993ms)  : 964, 1022
     .   : milestone, 993,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (109ms)  : 107, 112
     .   : milestone, 109,
    master - mean (110ms)  : 108, 111
     .   : milestone, 110,

    section Baseline
    This PR (7460) - mean (108ms)  : 105, 110
     .   : milestone, 108,
    master - mean (108ms)  : 106, 110
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (704ms)  : 684, 723
     .   : milestone, 704,
    master - mean (703ms)  : 679, 727
     .   : milestone, 703,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (96ms)  : 94, 97
     .   : milestone, 96,
    master - mean (96ms)  : 95, 97
     .   : milestone, 96,

    section Baseline
    This PR (7460) - mean (96ms)  : 93, 98
     .   : milestone, 96,
    master - mean (95ms)  : 93, 97
     .   : milestone, 95,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (657ms)  : 637, 677
     .   : milestone, 657,
    master - mean (666ms)  : 637, 696
     .   : milestone, 666,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (95ms)  : 93, 97
     .   : milestone, 95,
    master - mean (95ms)  : 93, 96
     .   : milestone, 95,

    section Baseline
    This PR (7460) - mean (94ms)  : 92, 97
     .   : milestone, 94,
    master - mean (94ms)  : 92, 97
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (595ms)  : 584, 606
     .   : milestone, 595,
    master - mean (597ms)  : 587, 607
     .   : milestone, 597,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (197ms)  : 193, 202
     .   : milestone, 197,
    master - mean (200ms)  : 195, 204
     .   : milestone, 200,

    section Baseline
    This PR (7460) - mean (194ms)  : 188, 201
     .   : milestone, 194,
    master - mean (195ms)  : 189, 202
     .   : milestone, 195,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (1,117ms)  : 1082, 1153
     .   : milestone, 1117,
    master - mean (1,126ms)  : 1097, 1155
     .   : milestone, 1126,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (281ms)  : 277, 286
     .   : milestone, 281,
    master - mean (285ms)  : 278, 292
     .   : milestone, 285,

    section Baseline
    This PR (7460) - mean (281ms)  : 275, 286
     .   : milestone, 281,
    master - mean (283ms)  : 276, 291
     .   : milestone, 283,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (902ms)  : 868, 935
     .   : milestone, 902,
    master - mean (924ms)  : 887, 962
     .   : milestone, 924,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (272ms)  : 267, 278
     .   : milestone, 272,
    master - mean (277ms)  : 271, 283
     .   : milestone, 277,

    section Baseline
    This PR (7460) - mean (272ms)  : 268, 276
     .   : milestone, 272,
    master - mean (279ms)  : 269, 288
     .   : milestone, 279,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (881ms)  : 851, 912
     .   : milestone, 881,
    master - mean (905ms)  : 874, 937
     .   : milestone, 905,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7460) - mean (273ms)  : 269, 277
     .   : milestone, 273,
    master - mean (278ms)  : 272, 284
     .   : milestone, 278,

    section Baseline
    This PR (7460) - mean (271ms)  : 265, 276
     .   : milestone, 271,
    master - mean (277ms)  : 269, 285
     .   : milestone, 277,

    section CallTarget+Inlining+NGEN
    This PR (7460) - mean (801ms)  : 771, 831
     .   : milestone, 801,
    master - mean (818ms)  : 787, 848
     .   : milestone, 818,

Loading

@daniel-romano-DD daniel-romano-DD changed the title [Native] Convert Rrejitters vector to a fixed array to avoid race conditions on growth [Native] Convert Rejitters vector to a fixed array Sep 2, 2025
@pr-commenter
Copy link

pr-commenter bot commented Sep 2, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7460 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.615
  • 2 benchmarks are slower, with geometric mean 1.381
  • 2 benchmarks have fewer allocations
  • 3 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 10.6μs 59.9ns 397ns 0 0 0 5.48 KB
master StartStopWithChild netcoreapp3.1 13.2μs 67.4ns 330ns 0 0 0 5.7 KB
master StartStopWithChild net472 21.8μs 119ns 843ns 0.966 0.43 0.107 6 KB
#7460 StartStopWithChild net6.0 10.8μs 59.2ns 355ns 0 0 0 5.49 KB
#7460 StartStopWithChild netcoreapp3.1 13.8μs 72.8ns 371ns 0 0 0 5.7 KB
#7460 StartStopWithChild net472 21.9μs 112ns 551ns 1.02 0.339 0.113 6.01 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 947μs 90.7ns 339ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 239ns 863ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.19ms 71.6ns 258ns 0 0 0 3.31 KB
#7460 WriteAndFlushEnrichedTraces net6.0 924μs 63.7ns 247ns 0 0 0 2.71 KB
#7460 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 121ns 454ns 0 0 0 2.7 KB
#7460 WriteAndFlushEnrichedTraces net472 1.21ms 1.42μs 5.5μs 0 0 0 3.31 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 322μs 1.5μs 6μs 0 0 0 172.07 KB
master AllCycleSimpleBody netcoreapp3.1 454μs 1.11μs 4.16μs 0 0 0 174.18 KB
master AllCycleSimpleBody net472 424μs 93.8ns 351ns 29.2 0 0 194.24 KB
master AllCycleMoreComplexBody net6.0 325μs 1.68μs 7.87μs 0 0 0 175.58 KB
master AllCycleMoreComplexBody netcoreapp3.1 492μs 672ns 2.6μs 0 0 0 177.6 KB
master AllCycleMoreComplexBody net472 433μs 140ns 541ns 30.2 0 0 197.76 KB
master ObjectExtractorSimpleBody net6.0 322ns 1.58ns 6.88ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 2.05ns 10.1ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 304ns 0.0415ns 0.161ns 0.0436 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.24μs 32ns 143ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.73μs 37.9ns 161ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.69μs 0.786ns 2.83ns 0.573 0 0 3.8 KB
#7460 AllCycleSimpleBody net6.0 325μs 1.05μs 4.06μs 0 0 0 172.07 KB
#7460 AllCycleSimpleBody netcoreapp3.1 457μs 1.51μs 5.87μs 0 0 0 174.18 KB
#7460 AllCycleSimpleBody net472 426μs 142ns 552ns 29.2 0 0 194.24 KB
#7460 AllCycleMoreComplexBody net6.0 333μs 1.53μs 5.94μs 0 0 0 175.58 KB
#7460 AllCycleMoreComplexBody netcoreapp3.1 506μs 2.06μs 7.97μs 0 0 0 177.6 KB
#7460 AllCycleMoreComplexBody net472 434μs 493ns 1.91μs 30.2 0 0 197.76 KB
#7460 ObjectExtractorSimpleBody net6.0 326ns 1.67ns 7.3ns 0 0 0 280 B
#7460 ObjectExtractorSimpleBody netcoreapp3.1 397ns 2.24ns 14ns 0 0 0 272 B
#7460 ObjectExtractorSimpleBody net472 304ns 0.0331ns 0.128ns 0.0435 0 0 281 B
#7460 ObjectExtractorMoreComplexBody net6.0 6.28μs 32.6ns 163ns 0 0 0 3.78 KB
#7460 ObjectExtractorMoreComplexBody netcoreapp3.1 7.73μs 35.9ns 144ns 0 0 0 3.69 KB
#7460 ObjectExtractorMoreComplexBody net472 6.69μs 0.26ns 0.936ns 0.601 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.3μs 340ns 1.32μs 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.8μs 184ns 711ns 0 0 0 32.4 KB
master EncodeArgs net472 112μs 25.2ns 97.6ns 5.06 0 0 32.51 KB
master EncodeLegacyArgs net6.0 154μs 104ns 403ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 195μs 121ns 469ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 261μs 67.9ns 263ns 0 0 0 2.16 KB
#7460 EncodeArgs net6.0 85.3μs 19.2ns 74.3ns 0 0 0 32.4 KB
#7460 EncodeArgs netcoreapp3.1 98.1μs 50.2ns 194ns 0 0 0 32.4 KB
#7460 EncodeArgs net472 111μs 77.2ns 278ns 5.01 0 0 32.5 KB
#7460 EncodeLegacyArgs net6.0 144μs 19.2ns 71.8ns 0 0 0 2.14 KB
#7460 EncodeLegacyArgs netcoreapp3.1 198μs 171ns 661ns 0 0 0 2.15 KB
#7460 EncodeLegacyArgs net472 263μs 33.2ns 129ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7460

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 1.708 299,359.97 511,184.98

Faster 🎉 in #7460

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.078 863,366.88 415,477.37

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 400μs 103ns 398ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 813μs 14.2μs 142μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 433μs 105ns 408ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 287μs 94.1ns 364ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 299μs 208ns 806ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 314μs 33.6ns 130ns 0 0 0 2.29 KB
#7460 RunWafRealisticBenchmark net6.0 392μs 40.8ns 158ns 0 0 0 4.56 KB
#7460 RunWafRealisticBenchmark netcoreapp3.1 415μs 124ns 463ns 0 0 0 4.48 KB
#7460 RunWafRealisticBenchmark net472 432μs 73.2ns 283ns 0 0 0 4.66 KB
#7460 RunWafRealisticBenchmarkWithAttack net6.0 286μs 41.2ns 159ns 0 0 0 2.24 KB
#7460 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 486μs 6.58μs 65.8μs 0 0 0 2.22 KB
#7460 RunWafRealisticBenchmarkWithAttack net472 312μs 84.3ns 327ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 61.2μs 35.2ns 136ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.7μs 259ns 970ns 0 0 0 17.42 KB
master SendRequest net472 0.00797ns 0.00257ns 0.00995ns 0 0 0 0 b
#7460 SendRequest net6.0 60.3μs 71.6ns 248ns 0 0 0 14.52 KB
#7460 SendRequest netcoreapp3.1 70.9μs 57.3ns 214ns 0 0 0 17.42 KB
#7460 SendRequest net472 0.0083ns 0.00264ns 0.0102ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7460

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 1.117 1,349,045.14 1,507,184.03

More allocations ⚠️ in #7460

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 0 b 1 B 1 B
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 1 B 3 B 2 B 200.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.91ms 3.99μs 15.4μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.12ms 4.08μs 15.8μs 0 0 0 640 KB
master OriginalCharSlice net472 2.6ms 102ns 382ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.35ms 1.1μs 4.27μs 0 0 0 4 B
master OptimizedCharSlice netcoreapp3.1 1.65ms 342ns 1.32μs 0 0 0 1 B
master OptimizedCharSlice net472 1.98ms 305ns 1.18μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 815μs 22.6ns 87.5ns 0 0 0 1 B
master OptimizedCharSliceWithPool netcoreapp3.1 842μs 24.3ns 91ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.14ms 99.6ns 359ns 0 0 0 0 b
#7460 OriginalCharSlice net6.0 1.93ms 1.46μs 5.48μs 0 0 0 640.01 KB
#7460 OriginalCharSlice netcoreapp3.1 2.17ms 10.6μs 45.2μs 0 0 0 640 KB
#7460 OriginalCharSlice net472 2.59ms 262ns 944ns 100 0 0 641.95 KB
#7460 OptimizedCharSlice net6.0 1.51ms 372ns 1.44μs 0 0 0 4 B
#7460 OptimizedCharSlice netcoreapp3.1 1.65ms 632ns 2.45μs 0 0 0 1 B
#7460 OptimizedCharSlice net472 2.04ms 531ns 2.06μs 0 0 0 0 b
#7460 OptimizedCharSliceWithPool net6.0 849μs 28.4ns 110ns 0 0 0 3 B
#7460 OptimizedCharSliceWithPool netcoreapp3.1 805μs 326ns 1.26μs 0 0 0 1 B
#7460 OptimizedCharSliceWithPool net472 1.13ms 88.2ns 342ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 734μs 4.11μs 27.6μs 0 0 0 41.72 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 725μs 3.01μs 10.9μs 0 0 0 41.98 KB
master WriteAndFlushEnrichedTraces net472 916μs 3.31μs 11.5μs 8.33 0 0 56.01 KB
#7460 WriteAndFlushEnrichedTraces net6.0 647μs 3.28μs 14.7μs 0 0 0 41.74 KB
#7460 WriteAndFlushEnrichedTraces netcoreapp3.1 746μs 5.05μs 50.5μs 0 0 0 41.91 KB
#7460 WriteAndFlushEnrichedTraces net472 954μs 4.49μs 19.1μs 8.33 0 0 55.95 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.82μs 9.05ns 37.3ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.4μs 7.98ns 28.8ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.8μs 2.01ns 7.5ns 0.153 0.0139 0 987 B
#7460 ExecuteNonQuery net6.0 1.87μs 10.2ns 56.8ns 0 0 0 1.02 KB
#7460 ExecuteNonQuery netcoreapp3.1 2.58μs 12.4ns 49.6ns 0 0 0 1.02 KB
#7460 ExecuteNonQuery net472 2.66μs 3.83ns 13.8ns 0.147 0.0134 0 987 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.71μs 8.27ns 34.1ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.22μs 10.9ns 47.4ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.53μs 2.06ns 7.7ns 0.159 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.79μs 9ns 38.2ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.4μs 11.9ns 51.7ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.76μs 1.73ns 6.72ns 0.17 0 0 1.1 KB
#7460 CallElasticsearch net6.0 1.73μs 2.84ns 11ns 0 0 0 1.03 KB
#7460 CallElasticsearch netcoreapp3.1 2.28μs 10.9ns 43.5ns 0 0 0 1.03 KB
#7460 CallElasticsearch net472 3.88μs 2.74ns 10.6ns 0.154 0 0 1.04 KB
#7460 CallElasticsearchAsync net6.0 1.89μs 7.97ns 30.9ns 0 0 0 1.01 KB
#7460 CallElasticsearchAsync netcoreapp3.1 2.45μs 12.1ns 55.5ns 0 0 0 1.08 KB
#7460 CallElasticsearchAsync net472 4.06μs 5.24ns 20.3ns 0.161 0 0 1.1 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.86μs 6.33ns 24.5ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.31μs 6.63ns 25.7ns 0 0 0 952 B
master ExecuteAsync net472 2.51μs 0.445ns 1.66ns 0.137 0 0 915 B
#7460 ExecuteAsync net6.0 1.74μs 0.652ns 2.52ns 0 0 0 952 B
#7460 ExecuteAsync netcoreapp3.1 2.32μs 9.96ns 38.6ns 0 0 0 952 B
#7460 ExecuteAsync net472 2.49μs 4.46ns 17.3ns 0.138 0 0 915 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.82μs 4.57ns 15.8ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.47μs 31.4ns 117ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 8.79ns 34ns 0.487 0 0 3.18 KB
#7460 SendAsync net6.0 7.18μs 3.51ns 12.2ns 0 0 0 2.36 KB
#7460 SendAsync netcoreapp3.1 8.48μs 28.3ns 110ns 0 0 0 2.9 KB
#7460 SendAsync net472 12.3μs 8.88ns 33.2ns 0.494 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7460

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 1.255 61,100.00 48,700.00 bimodal

More allocations ⚠️ in #7460

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.78 KB 44.38 KB 608 B 1.39%

Fewer allocations 🎉 in #7460

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 260.06 KB 256.69 KB -3.38 KB -1.30%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 277.59 KB 258.06 KB -19.53 KB -7.03%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 44.5μs 248ns 1.47μs 0 0 0 43.78 KB
master StringConcatBenchmark netcoreapp3.1 58.4μs 760ns 7.52μs 0 0 0 42.86 KB
master StringConcatBenchmark net472 57.3μs 136ns 511ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 461μs 2.12μs 8.73μs 0 0 0 260.06 KB
master StringConcatAspectBenchmark netcoreapp3.1 518μs 1.99μs 7.45μs 0 0 0 277.59 KB
master StringConcatAspectBenchmark net472 402μs 2.28μs 16.1μs 0 0 0 286.72 KB
#7460 StringConcatBenchmark net6.0 48.6μs 284ns 2.32μs 0 0 0 44.38 KB
#7460 StringConcatBenchmark netcoreapp3.1 48.8μs 244ns 1.54μs 0 0 0 42.9 KB
#7460 StringConcatBenchmark net472 56.6μs 192ns 692ns 0 0 0 57.34 KB
#7460 StringConcatAspectBenchmark net6.0 447μs 1.8μs 6.5μs 0 0 0 256.69 KB
#7460 StringConcatAspectBenchmark netcoreapp3.1 514μs 1.42μs 5.31μs 0 0 0 258.06 KB
#7460 StringConcatAspectBenchmark net472 402μs 2.01μs 8.78μs 0 0 0 286.72 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.52μs 1.11ns 4.15ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.39μs 12ns 45.1ns 0 0 0 1.7 KB
master EnrichedLog net472 4.04μs 5.28ns 20.4ns 0.242 0 0 1.64 KB
#7460 EnrichedLog net6.0 2.62μs 0.981ns 3.67ns 0 0 0 1.7 KB
#7460 EnrichedLog netcoreapp3.1 3.46μs 15.9ns 63.5ns 0 0 0 1.7 KB
#7460 EnrichedLog net472 4.06μs 5.54ns 20.7ns 0.245 0 0 1.64 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 123μs 204ns 736ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 88.1ns 330ns 0 0 0 4.31 KB
master EnrichedLog net472 166μs 84.6ns 328ns 0 0 0 4.51 KB
#7460 EnrichedLog net6.0 123μs 77ns 298ns 0 0 0 4.31 KB
#7460 EnrichedLog netcoreapp3.1 127μs 138ns 534ns 0 0 0 4.31 KB
#7460 EnrichedLog net472 167μs 24.9ns 93.1ns 0 0 0 4.52 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.05μs 3.24ns 12.5ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.59μs 24.6ns 95.4ns 0 0 0 2.26 KB
master EnrichedLog net472 7.42μs 6.89ns 26.7ns 0.297 0 0 2.08 KB
#7460 EnrichedLog net6.0 4.94μs 7.7ns 29.8ns 0 0 0 2.26 KB
#7460 EnrichedLog netcoreapp3.1 6.74μs 11ns 39.7ns 0 0 0 2.26 KB
#7460 EnrichedLog net472 7.69μs 5.83ns 22.6ns 0.307 0 0 2.08 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.95μs 8.83ns 34.2ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.68μs 2.55ns 9.87ns 0 0 0 1.2 KB
master SendReceive net472 3.12μs 2.61ns 9.77ns 0.186 0 0 1.2 KB
#7460 SendReceive net6.0 1.92μs 9.45ns 42.3ns 0 0 0 1.2 KB
#7460 SendReceive netcoreapp3.1 2.54μs 12.6ns 52ns 0 0 0 1.2 KB
#7460 SendReceive net472 3.1μs 5.13ns 19.9ns 0.185 0 0 1.2 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.08μs 3.34ns 12.5ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.5μs 18.5ns 69.3ns 0 0 0 1.63 KB
master EnrichedLog net472 6.72μs 8.45ns 32.7ns 0.3 0 0 2.03 KB
#7460 EnrichedLog net6.0 4.29μs 14.4ns 51.9ns 0 0 0 1.58 KB
#7460 EnrichedLog netcoreapp3.1 5.55μs 16.5ns 63.8ns 0 0 0 1.63 KB
#7460 EnrichedLog net472 6.37μs 6.18ns 23.9ns 0.32 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 780ns 3.71ns 14.8ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 938ns 0.591ns 2.05ns 0 0 0 576 B
master StartFinishSpan net472 900ns 0.36ns 1.39ns 0.0907 0 0 578 B
master StartFinishScope net6.0 876ns 0.782ns 2.93ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.1μs 5.59ns 26.2ns 0 0 0 696 B
master StartFinishScope net472 1.11μs 0.405ns 1.52ns 0.0993 0 0 658 B
#7460 StartFinishSpan net6.0 740ns 0.225ns 0.844ns 0 0 0 576 B
#7460 StartFinishSpan netcoreapp3.1 947ns 4.9ns 24ns 0 0 0 576 B
#7460 StartFinishSpan net472 942ns 0.0858ns 0.309ns 0.0884 0 0 578 B
#7460 StartFinishScope net6.0 895ns 4.8ns 26.3ns 0 0 0 696 B
#7460 StartFinishScope netcoreapp3.1 1.14μs 5.47ns 23.2ns 0 0 0 696 B
#7460 StartFinishScope net472 1.09μs 0.141ns 0.507ns 0.104 0 0 658 B
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.12μs 5.45ns 21.8ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.36μs 0.57ns 2.21ns 0 0 0 696 B
master RunOnMethodBegin net472 1.4μs 0.157ns 0.588ns 0.104 0 0 658 B
#7460 RunOnMethodBegin net6.0 1.01μs 5.15ns 22.4ns 0 0 0 697 B
#7460 RunOnMethodBegin netcoreapp3.1 1.37μs 5.36ns 20.7ns 0 0 0 696 B
#7460 RunOnMethodBegin net472 1.37μs 0.363ns 1.41ns 0.104 0 0 658 B

@daniel-romano-DD daniel-romano-DD force-pushed the dani/apm/rejitters_container_refactor branch from 747af80 to 10a4643 Compare September 3, 2025 09:51
Copy link

datadog-official bot commented Sep 3, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 379e45a | Docs | Was this helpful? Give us feedback!

@daniel-romano-DD daniel-romano-DD force-pushed the dani/apm/rejitters_container_refactor branch from 1b99ddf to f3bc585 Compare September 3, 2025 13:02
@daniel-romano-DD daniel-romano-DD force-pushed the dani/apm/rejitters_container_refactor branch from 499bd67 to 2f9a0eb Compare September 3, 2025 14:56
@daniel-romano-DD daniel-romano-DD merged commit 6baf47e into master Sep 4, 2025
153 checks passed
@daniel-romano-DD daniel-romano-DD deleted the dani/apm/rejitters_container_refactor branch September 4, 2025 08:26
@github-actions github-actions bot added this to the vNext-v3 milestone Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:asm area:debugger area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants