Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize the tracer thread names #5644

Merged
merged 8 commits into from
Jun 4, 2024
Merged

Normalize the tracer thread names #5644

merged 8 commits into from
Jun 4, 2024

Conversation

kevingosse
Copy link
Collaborator

Summary of changes

Prefix all tracer thread names with DD_.

Reason for change

Libunwind struggles to unwind signals on Alpine, which makes our work more difficult to know if our instrumentation caused the crash or not. Normalizing the thread names will allow to use this extra info to figure out if we caused the crash.

Implementation details

There were remnant of a an unused thread in dataflow so I cleaned that up.

Test coverage

It works on my machine.

@kevingosse kevingosse requested review from a team as code owners June 3, 2024 15:15
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jun 3, 2024

Datadog Report

Branch report: kevin/tracer_threads
Commit report: dd499f3
Test service: dd-trace-dotnet

✅ 0 Failed, 339954 Passed, 2046 Skipped, 22h 35m 16.58s Total Time

@andrewlock
Copy link
Member

andrewlock commented Jun 3, 2024

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.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5644) - mean (74ms)  : 65, 83
     .   : milestone, 74,
    master - mean (73ms)  : 60, 86
     .   : milestone, 73,

    section CallTarget+Inlining+NGEN
    This PR (5644) - mean (976ms)  : 953, 999
     .   : milestone, 976,
    master - mean (983ms)  : 957, 1009
     .   : milestone, 983,

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

    section CallTarget+Inlining+NGEN
    This PR (5644) - mean (687ms)  : 663, 710
     .   : milestone, 687,
    master - mean (681ms)  : 663, 700
     .   : milestone, 681,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5644) - mean (92ms)  : 90, 94
     .   : milestone, 92,
    master - mean (93ms)  : 90, 96
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (5644) - mean (646ms)  : 622, 670
     .   : milestone, 646,
    master - mean (642ms)  : 621, 664
     .   : milestone, 642,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5644) - mean (195ms)  : 189, 200
     .   : milestone, 195,
    master - mean (192ms)  : 189, 195
     .   : milestone, 192,

    section CallTarget+Inlining+NGEN
    This PR (5644) - mean (1,075ms)  : 1053, 1097
     .   : milestone, 1075,
    master - mean (1,081ms)  : 1056, 1105
     .   : milestone, 1081,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5644) - mean (277ms)  : 273, 280
     .   : milestone, 277,
    master - mean (277ms)  : 273, 281
     .   : milestone, 277,

    section CallTarget+Inlining+NGEN
    This PR (5644) - mean (860ms)  : 838, 882
     .   : milestone, 860,
    master - mean (867ms)  : 848, 886
     .   : milestone, 867,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5644) - mean (268ms)  : 249, 287
     .   : milestone, 268,
    master - mean (267ms)  : 262, 273
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (5644) - mean (851ms)  : 819, 882
     .   : milestone, 851,
    master - mean (856ms)  : 821, 892
     .   : milestone, 856,

Loading

@andrewlock
Copy link
Member

andrewlock commented Jun 3, 2024

Benchmarks Report for appsec 🐌

Benchmarks for #5644 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.142
  • 2 benchmarks have fewer 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.Asm.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5644

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472 1.142 194.82 170.65

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 71.1μs 67.9ns 254ns 0.0706 0 0 6 KB
master AllCycleSimpleBody netcoreapp3.1 61.5μs 56.2ns 210ns 0.0917 0 0 6.94 KB
master AllCycleSimpleBody net472 49.2μs 49.8ns 180ns 1.3 0 0 8.33 KB
master AllCycleMoreComplexBody net6.0 77μs 68.2ns 264ns 0.115 0 0 9.5 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.3μs 77.8ns 301ns 0.138 0 0 10.36 KB
master AllCycleMoreComplexBody net472 55.7μs 78.9ns 306ns 1.87 0.0279 0 11.84 KB
master ObjectExtractorSimpleBody net6.0 156ns 0.0702ns 0.253ns 0.00394 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.276ns 1.07ns 0.00365 0 0 272 B
master ObjectExtractorSimpleBody net472 193ns 0.832ns 3.22ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.15μs 1.8ns 6.98ns 0.0532 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.96μs 1.85ns 7.15ns 0.0495 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.87μs 2.28ns 8.23ns 0.602 0.00583 0 3.8 KB
#5644 AllCycleSimpleBody net6.0 72.2μs 110ns 425ns 0.0721 0 0 6 KB
#5644 AllCycleSimpleBody netcoreapp3.1 61.9μs 95.5ns 357ns 0.0936 0 0 6.94 KB
#5644 AllCycleSimpleBody net472 48.8μs 81.6ns 305ns 1.32 0 0 8.33 KB
#5644 AllCycleMoreComplexBody net6.0 78.6μs 102ns 383ns 0.118 0 0 9.5 KB
#5644 AllCycleMoreComplexBody netcoreapp3.1 68.6μs 91ns 352ns 0.137 0 0 10.36 KB
#5644 AllCycleMoreComplexBody net472 56.4μs 101ns 393ns 1.88 0.0281 0 11.84 KB
#5644 ObjectExtractorSimpleBody net6.0 151ns 0.178ns 0.689ns 0.00392 0 0 280 B
#5644 ObjectExtractorSimpleBody netcoreapp3.1 204ns 0.1ns 0.361ns 0.00369 0 0 272 B
#5644 ObjectExtractorSimpleBody net472 170ns 0.358ns 1.39ns 0.0446 0 0 281 B
#5644 ObjectExtractorMoreComplexBody net6.0 3.16μs 1.8ns 6.72ns 0.0537 0 0 3.78 KB
#5644 ObjectExtractorMoreComplexBody netcoreapp3.1 3.99μs 1.3ns 5.05ns 0.0502 0 0 3.69 KB
#5644 ObjectExtractorMoreComplexBody net472 3.76μs 2.75ns 10.7ns 0.602 0.00564 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 40μs 24.3ns 94.2ns 0.459 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 55.4μs 22.6ns 84.5ns 0.441 0 0 32.4 KB
master EncodeArgs net472 69.9μs 59.1ns 229ns 5.14 0.0695 0 32.5 KB
master EncodeLegacyArgs net6.0 78.4μs 95.2ns 356ns 0.0389 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 106μs 249ns 963ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 154μs 165ns 639ns 0.308 0 0 2.15 KB
#5644 EncodeArgs net6.0 39.8μs 25ns 96.8ns 0.459 0 0 32.4 KB
#5644 EncodeArgs netcoreapp3.1 55.3μs 34.6ns 134ns 0.443 0 0 32.4 KB
#5644 EncodeArgs net472 68.3μs 60.6ns 235ns 5.13 0.0685 0 32.5 KB
#5644 EncodeLegacyArgs net6.0 74.1μs 415ns 2.59μs 0 0 0 2.14 KB
#5644 EncodeLegacyArgs netcoreapp3.1 105μs 278ns 1.08μs 0 0 0 2.14 KB
#5644 EncodeLegacyArgs net472 154μs 97.9ns 379ns 0.31 0 0 2.15 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 181μs 173ns 669ns 0 0 0 2.42 KB
master RunWafRealisticBenchmark netcoreapp3.1 198μs 152ns 570ns 0 0 0 2.37 KB
master RunWafRealisticBenchmark net472 214μs 111ns 432ns 0.321 0 0 2.43 KB
master RunWafRealisticBenchmarkWithAttack net6.0 122μs 76.9ns 298ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 130μs 57.6ns 223ns 0 0 0 1.45 KB
master RunWafRealisticBenchmarkWithAttack net472 141μs 129ns 500ns 0.212 0 0 1.48 KB
#5644 RunWafRealisticBenchmark net6.0 184μs 125ns 450ns 0 0 0 2.42 KB
#5644 RunWafRealisticBenchmark netcoreapp3.1 199μs 339ns 1.31μs 0 0 0 2.37 KB
#5644 RunWafRealisticBenchmark net472 216μs 116ns 449ns 0.323 0 0 2.43 KB
#5644 RunWafRealisticBenchmarkWithAttack net6.0 121μs 53.9ns 209ns 0 0 0 1.46 KB
#5644 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 133μs 202ns 781ns 0 0 0 1.45 KB
#5644 RunWafRealisticBenchmarkWithAttack net472 141μs 52.8ns 205ns 0.211 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #5644

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 255.69 KB 254.25 KB -1.44 KB -0.56%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 253.38 KB 251.86 KB -1.53 KB -0.60%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 58.3μs 736ns 7.29μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 53.4μs 253ns 948ns 0 0 0 42.64 KB
master StringConcatBenchmark net472 38.2μs 94.9ns 329ns 0 0 0 59.31 KB
master StringConcatAspectBenchmark net6.0 307μs 1.5μs 9.25μs 0 0 0 255.69 KB
master StringConcatAspectBenchmark netcoreapp3.1 333μs 1.84μs 11.2μs 0 0 0 253.38 KB
master StringConcatAspectBenchmark net472 287μs 6.4μs 60.7μs 0 0 0 278.53 KB
#5644 StringConcatBenchmark net6.0 51.6μs 191ns 715ns 0 0 0 43.44 KB
#5644 StringConcatBenchmark netcoreapp3.1 53.5μs 227ns 787ns 0 0 0 42.64 KB
#5644 StringConcatBenchmark net472 38.2μs 52ns 180ns 0 0 0 59.36 KB
#5644 StringConcatAspectBenchmark net6.0 276μs 4.84μs 47.7μs 0 0 0 254.25 KB
#5644 StringConcatAspectBenchmark netcoreapp3.1 332μs 1.86μs 11.8μs 0 0 0 251.86 KB
#5644 StringConcatAspectBenchmark net472 294μs 5.7μs 55.9μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

andrewlock commented Jun 3, 2024

Throughput/Crank Report:zap:

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5644) (11.123M)   : 0, 11122901
    master (11.357M)   : 0, 11356837
    benchmarks/2.9.0 (11.482M)   : 0, 11482120

    section Automatic
    This PR (5644) (7.559M)   : 0, 7558540
    master (7.603M)   : 0, 7602878
    benchmarks/2.9.0 (8.261M)   : 0, 8261135

    section Trace stats
    master (7.836M)   : 0, 7835655

    section Manual
    This PR (5644) (9.537M)   : 0, 9537491
    master (9.865M)   : 0, 9865169

    section Manual + Automatic
    This PR (5644) (7.128M)   : 0, 7128057
    master (7.231M)   : 0, 7231462

    section Version Conflict
    master (6.515M)   : 0, 6515407

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5644) (9.625M)   : 0, 9624917
    master (9.565M)   : 0, 9565107
    benchmarks/2.9.0 (9.752M)   : 0, 9752478

    section Automatic
    This PR (5644) (6.554M)   : 0, 6554197
    master (6.633M)   : 0, 6632849

    section Trace stats
    master (6.911M)   : 0, 6910535

    section Manual
    This PR (5644) (8.327M)   : 0, 8327099
    master (8.309M)   : 0, 8309371

    section Manual + Automatic
    This PR (5644) (6.281M)   : 0, 6281087
    master (6.206M)   : 0, 6205978

    section Version Conflict
    master (5.671M)   : 0, 5670657

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5644) (9.917M)   : 0, 9917383
    master (9.777M)   : 0, 9777473
    benchmarks/2.9.0 (9.820M)   : 0, 9820306

    section Automatic
    This PR (5644) (7.087M)   : 0, 7087418
    master (6.858M)   : 0, 6857662
    benchmarks/2.9.0 (7.183M)   : 0, 7183038

    section Trace stats
    master (7.329M)   : 0, 7328735

    section Manual
    This PR (5644) (8.946M)   : 0, 8946114
    master (8.518M)   : 0, 8518082

    section Manual + Automatic
    This PR (5644) (6.819M)   : 0, 6819206
    master (6.619M)   : 0, 6619446

    section Version Conflict
    master (6.015M)   : 0, 6015025

Loading

@andrewlock
Copy link
Member

andrewlock commented Jun 3, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #5644 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.175
  • 1 benchmarks are slower, with geometric mean 1.118
  • 1 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 8.71μs 46.7ns 256ns 0.0174 0.0087 0 7.55 KB
master StartStopWithChild netcoreapp3.1 10.8μs 59.2ns 325ns 0.0272 0.0109 0 7.66 KB
master StartStopWithChild net472 16.8μs 49.5ns 192ns 1.34 0.36 0.109 8.05 KB
#5644 StartStopWithChild net6.0 8.66μs 47.3ns 296ns 0.026 0.013 0 7.55 KB
#5644 StartStopWithChild netcoreapp3.1 10.9μs 61.4ns 417ns 0.0313 0.0157 0 7.65 KB
#5644 StartStopWithChild net472 17μs 59.4ns 230ns 1.34 0.331 0.11 8.06 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 471μs 167ns 647ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 634μs 269ns 1.04μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 844μs 255ns 956ns 0.419 0 0 3.3 KB
#5644 WriteAndFlushEnrichedTraces net6.0 474μs 125ns 432ns 0 0 0 2.7 KB
#5644 WriteAndFlushEnrichedTraces netcoreapp3.1 646μs 163ns 611ns 0 0 0 2.7 KB
#5644 WriteAndFlushEnrichedTraces net472 836μs 228ns 885ns 0.417 0 0 3.3 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 172μs 252ns 977ns 0.259 0 0 18.44 KB
master SendRequest netcoreapp3.1 195μs 313ns 1.21μs 0.194 0 0 20.6 KB
master SendRequest net472 0.00109ns 0.000333ns 0.00115ns 0 0 0 0 b
#5644 SendRequest net6.0 170μs 170ns 659ns 0.17 0 0 18.44 KB
#5644 SendRequest netcoreapp3.1 195μs 236ns 912ns 0.194 0 0 20.6 KB
#5644 SendRequest net472 0.000244ns 0.000124ns 0.000481ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #5644

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.58 KB 41.9 KB 326 B 0.78%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 557μs 406ns 1.57μs 0.558 0 0 41.78 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 657μs 1.8μs 6.75μs 0.324 0 0 41.58 KB
master WriteAndFlushEnrichedTraces net472 848μs 2.63μs 10.2μs 8.17 2.45 0.408 53.25 KB
#5644 WriteAndFlushEnrichedTraces net6.0 541μs 772ns 2.99μs 0.539 0 0 41.73 KB
#5644 WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 2.51μs 9.73μs 0.329 0 0 41.9 KB
#5644 WriteAndFlushEnrichedTraces net472 866μs 2.35μs 9.1μs 8.19 2.59 0.431 53.25 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.04μs 0.847ns 3.28ns 0.0115 0 0 808 B
master ExecuteNonQuery netcoreapp3.1 1.54μs 0.948ns 3.67ns 0.0108 0 0 808 B
master ExecuteNonQuery net472 1.68μs 1.83ns 7.08ns 0.122 0 0 770 B
#5644 ExecuteNonQuery net6.0 1.13μs 0.513ns 1.85ns 0.0113 0 0 808 B
#5644 ExecuteNonQuery netcoreapp3.1 1.49μs 0.472ns 1.77ns 0.0111 0 0 808 B
#5644 ExecuteNonQuery net472 1.8μs 1.86ns 7.21ns 0.122 0 0 770 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.14μs 0.729ns 2.82ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.54μs 0.621ns 2.24ns 0.013 0 0 976 B
master CallElasticsearch net472 2.4μs 1.76ns 6.83ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.32μs 0.374ns 1.45ns 0.0132 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 1.18ns 4.41ns 0.0135 0 0 1.02 KB
master CallElasticsearchAsync net472 2.56μs 1.77ns 6.86ns 0.166 0 0 1.05 KB
#5644 CallElasticsearch net6.0 1.19μs 0.542ns 2.03ns 0.0137 0 0 976 B
#5644 CallElasticsearch netcoreapp3.1 1.59μs 0.594ns 2.22ns 0.0127 0 0 976 B
#5644 CallElasticsearch net472 2.32μs 2.43ns 9.42ns 0.158 0.00118 0 995 B
#5644 CallElasticsearchAsync net6.0 1.27μs 0.851ns 3.3ns 0.0132 0 0 952 B
#5644 CallElasticsearchAsync netcoreapp3.1 1.64μs 0.915ns 3.42ns 0.0138 0 0 1.02 KB
#5644 CallElasticsearchAsync net472 2.56μs 2.29ns 8.88ns 0.166 0 0 1.05 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.22μs 0.869ns 3.25ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.69μs 2.03ns 7.31ns 0.0126 0 0 952 B
master ExecuteAsync net472 1.75μs 0.645ns 2.32ns 0.145 0 0 915 B
#5644 ExecuteAsync net6.0 1.31μs 0.676ns 2.53ns 0.0137 0 0 952 B
#5644 ExecuteAsync netcoreapp3.1 1.57μs 2.56ns 9.91ns 0.0125 0 0 952 B
#5644 ExecuteAsync net472 1.79μs 0.717ns 2.78ns 0.145 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 4.23μs 1.47ns 5.68ns 0.0296 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.1μs 1.22ns 4.55ns 0.0358 0 0 2.76 KB
master SendAsync net472 7.5μs 2.17ns 8.11ns 0.494 0 0 3.12 KB
#5644 SendAsync net6.0 4.17μs 1.82ns 6.82ns 0.0299 0 0 2.22 KB
#5644 SendAsync netcoreapp3.1 5.02μs 2.34ns 9.06ns 0.0377 0 0 2.76 KB
#5644 SendAsync net472 7.47μs 2.37ns 9.19ns 0.495 0 0 3.12 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 1.44μs 0.684ns 2.56ns 0.0232 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.15μs 0.884ns 3.43ns 0.0215 0 0 1.64 KB
master EnrichedLog net472 2.7μs 1.87ns 7ns 0.249 0 0 1.57 KB
#5644 EnrichedLog net6.0 1.58μs 0.434ns 1.68ns 0.0231 0 0 1.64 KB
#5644 EnrichedLog netcoreapp3.1 2.22μs 0.928ns 3.47ns 0.0222 0 0 1.64 KB
#5644 EnrichedLog net472 2.51μs 1.05ns 3.94ns 0.249 0 0 1.57 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 118μs 194ns 753ns 0.0581 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 120μs 101ns 391ns 0.0597 0 0 4.28 KB
master EnrichedLog net472 151μs 118ns 457ns 0.682 0.227 0 4.46 KB
#5644 EnrichedLog net6.0 117μs 114ns 410ns 0.0578 0 0 4.28 KB
#5644 EnrichedLog netcoreapp3.1 120μs 98ns 380ns 0 0 0 4.28 KB
#5644 EnrichedLog net472 150μs 95.6ns 370ns 0.677 0.226 0 4.46 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 3.08μs 1.12ns 4.35ns 0.0309 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.18μs 0.977ns 3.66ns 0.0294 0 0 2.2 KB
master EnrichedLog net472 4.93μs 1.57ns 6.08ns 0.319 0 0 2.02 KB
#5644 EnrichedLog net6.0 3.22μs 0.916ns 3.43ns 0.0307 0 0 2.2 KB
#5644 EnrichedLog netcoreapp3.1 4.4μs 3.75ns 14.5ns 0.0284 0 0 2.2 KB
#5644 EnrichedLog net472 4.9μs 2.06ns 7.69ns 0.319 0 0 2.02 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.4μs 0.626ns 2.34ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.79μs 0.861ns 3.33ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.03μs 1.13ns 4.36ns 0.183 0 0 1.16 KB
#5644 SendReceive net6.0 1.47μs 1.31ns 5.09ns 0.0165 0 0 1.14 KB
#5644 SendReceive netcoreapp3.1 1.73μs 0.929ns 3.6ns 0.0156 0 0 1.14 KB
#5644 SendReceive net472 2.08μs 0.625ns 2.25ns 0.183 0 0 1.16 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 2.85μs 0.402ns 1.5ns 0.0214 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.89μs 2.06ns 7.97ns 0.0213 0 0 1.65 KB
master EnrichedLog net472 4.38μs 1.87ns 6.75ns 0.322 0 0 2.04 KB
#5644 EnrichedLog net6.0 2.91μs 1.66ns 6.2ns 0.0216 0 0 1.6 KB
#5644 EnrichedLog netcoreapp3.1 3.83μs 1.63ns 5.89ns 0.0211 0 0 1.65 KB
#5644 EnrichedLog net472 4.33μs 2.85ns 10.6ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5644

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.118 413.83 462.83

Faster 🎉 in #5644

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.197 728.50 608.38
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.153 816.56 708.22

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 414ns 0.495ns 1.92ns 0.00814 0 0 576 B
master StartFinishSpan netcoreapp3.1 556ns 0.663ns 2.48ns 0.0077 0 0 576 B
master StartFinishSpan net472 728ns 0.223ns 0.863ns 0.0917 0.000357 0 578 B
master StartFinishScope net6.0 532ns 0.21ns 0.815ns 0.00982 0 0 696 B
master StartFinishScope netcoreapp3.1 816ns 0.491ns 1.9ns 0.00938 0 0 696 B
master StartFinishScope net472 807ns 0.427ns 1.66ns 0.104 0 0 658 B
#5644 StartFinishSpan net6.0 463ns 0.119ns 0.459ns 0.00814 0 0 576 B
#5644 StartFinishSpan netcoreapp3.1 554ns 0.247ns 0.955ns 0.0077 0 0 576 B
#5644 StartFinishSpan net472 609ns 0.332ns 1.29ns 0.0917 0 0 578 B
#5644 StartFinishScope net6.0 541ns 0.13ns 0.487ns 0.00973 0 0 696 B
#5644 StartFinishScope netcoreapp3.1 709ns 0.609ns 2.36ns 0.00928 0 0 696 B
#5644 StartFinishScope net472 851ns 0.907ns 3.51ns 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 644ns 0.353ns 1.37ns 0.00959 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 983ns 0.335ns 1.26ns 0.00931 0 0 696 B
master RunOnMethodBegin net472 1.14μs 0.174ns 0.674ns 0.105 0 0 658 B
#5644 RunOnMethodBegin net6.0 645ns 0.233ns 0.903ns 0.00967 0 0 696 B
#5644 RunOnMethodBegin netcoreapp3.1 908ns 0.333ns 1.29ns 0.00953 0 0 696 B
#5644 RunOnMethodBegin net472 1.06μs 0.263ns 0.948ns 0.104 0 0 658 B

Copy link
Member

@robertpi robertpi left a comment

Choose a reason for hiding this comment

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

Just checked the changes in dataflow.*

@andrewlock
Copy link
Member

I know nothing

@kevingosse kevingosse merged commit 2111f7a into master Jun 4, 2024
63 checks passed
@kevingosse kevingosse deleted the kevin/tracer_threads branch June 4, 2024 13:45
@github-actions github-actions bot added this to the vNext-v2 milestone Jun 4, 2024
@andrewlock andrewlock added the area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants