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

[APM] Exclude windows only definitions from non windows dlls #6270

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

daniel-romano-DD
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD commented Nov 11, 2024

Summary of changes

Remove windows only definitions from non windows dlls

Reason for change

Defs take up space. Removing non needed ones will help keep package size as low as possible

Implementation details

Surround windows only defs in #if _WIN32 clauses

Test coverage

Other details

@daniel-romano-DD daniel-romano-DD changed the base branch from master to dani/apm/NativeCallTargets November 11, 2024 16:59
Copy link
Contributor Author

daniel-romano-DD commented Nov 11, 2024

@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-iast area:builds project files, build scripts, pipelines, versioning, releases, packages labels Nov 11, 2024
@daniel-romano-DD daniel-romano-DD marked this pull request as ready for review November 11, 2024 17:06
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 11, 2024

Datadog Report

Branch report: dani/apm/SkipNetFxDefsInLinux
Commit report: 1a55d8c
Test service: dd-trace-dotnet

❌ 2 Failed (2 Known Flaky), 465596 Passed, 3586 Skipped, 32h 26m 6.99s Total Time

❌ Failed Tests (2)

  • OnSupportedFrameworkInSsi_CallsForwarderWithExpectedTelemetry - Datadog.Trace.ClrProfiler.IntegrationTests.InstrumentationTests - ❄️ Known flaky - Details

    Expand for error
     Expected boolean to be true, but found False.
    
  • OnSupportedFrameworkInSsi_CallsForwarderWithExpectedTelemetry - Datadog.Trace.ClrProfiler.IntegrationTests.InstrumentationTests - ❄️ Known flaky - Details

    Expand for error
     Expected boolean to be true, but found False.
    

@andrewlock
Copy link
Member

andrewlock commented Nov 11, 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 (6270) - mean (72ms)  : 65, 79
     .   : milestone, 72,
    master - mean (72ms)  : 62, 82
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (6270) - mean (982ms)  : 961, 1003
     .   : milestone, 982,
    master - mean (1,106ms)  : 1090, 1122
     .   : milestone, 1106,

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

    section CallTarget+Inlining+NGEN
    This PR (6270) - mean (690ms)  : 668, 713
     .   : milestone, 690,
    master - mean (766ms)  : 751, 781
     .   : milestone, 766,

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

    section CallTarget+Inlining+NGEN
    This PR (6270) - mean (637ms)  : 617, 658
     .   : milestone, 637,
    master - mean (728ms)  : 710, 745
     .   : milestone, 728,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6270) - mean (191ms)  : 185, 196
     .   : milestone, 191,
    master - mean (191ms)  : 182, 200
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (6270) - mean (1,096ms)  : 1067, 1124
     .   : milestone, 1096,
    master - mean (1,215ms)  : 1189, 1241
     .   : milestone, 1215,

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

    section CallTarget+Inlining+NGEN
    This PR (6270) - mean (877ms)  : 851, 903
     .   : milestone, 877,
    master - mean (943ms)  : 927, 959
     .   : milestone, 943,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6270) - mean (265ms)  : 261, 269
     .   : milestone, 265,
    master - mean (265ms)  : 262, 269
     .   : milestone, 265,

    section CallTarget+Inlining+NGEN
    This PR (6270) - mean (855ms)  : 827, 883
     .   : milestone, 855,
    master - mean (927ms)  : 910, 944
     .   : milestone, 927,

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 11, 2024

Benchmarks Report for appsec 🐌

Benchmarks for #6270 compared to master:

  • All benchmarks have the same speed
  • 2 benchmarks have fewer allocations
  • 2 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

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

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.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 72.3μs 67.8ns 263ns 0.0716 0 0 6 KB
master AllCycleSimpleBody netcoreapp3.1 62.5μs 58.7ns 220ns 0.0938 0 0 6.95 KB
master AllCycleSimpleBody net472 49.1μs 72ns 279ns 1.31 0 0 8.33 KB
master AllCycleMoreComplexBody net6.0 78.4μs 55ns 213ns 0.117 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.4μs 56.4ns 211ns 0.139 0 0 10.36 KB
master AllCycleMoreComplexBody net472 56.5μs 85.2ns 330ns 1.87 0.0283 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 145ns 0.12ns 0.448ns 0.00395 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.137ns 0.494ns 0.00369 0 0 272 B
master ObjectExtractorSimpleBody net472 171ns 0.0861ns 0.334ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.04μs 2.64ns 9.86ns 0.0533 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.91μs 3.08ns 11.9ns 0.0507 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 4.36μs 1.92ns 7.44ns 0.601 0.00656 0 3.8 KB
#6270 AllCycleSimpleBody net6.0 73.2μs 125ns 484ns 0.0747 0 0 6.01 KB
#6270 AllCycleSimpleBody netcoreapp3.1 63.1μs 65.6ns 245ns 0.0939 0 0 6.95 KB
#6270 AllCycleSimpleBody net472 49.2μs 44.1ns 165ns 1.32 0 0 8.34 KB
#6270 AllCycleMoreComplexBody net6.0 79.5μs 58.9ns 228ns 0.119 0 0 9.51 KB
#6270 AllCycleMoreComplexBody netcoreapp3.1 71.1μs 74.4ns 288ns 0.107 0 0 10.37 KB
#6270 AllCycleMoreComplexBody net472 55.6μs 42.8ns 160ns 1.86 0.0278 0 11.85 KB
#6270 ObjectExtractorSimpleBody net6.0 150ns 0.132ns 0.512ns 0.00392 0 0 280 B
#6270 ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.267ns 0.999ns 0.00377 0 0 272 B
#6270 ObjectExtractorSimpleBody net472 165ns 0.099ns 0.383ns 0.0446 0 0 281 B
#6270 ObjectExtractorMoreComplexBody net6.0 3.12μs 2.03ns 7.6ns 0.0531 0 0 3.78 KB
#6270 ObjectExtractorMoreComplexBody netcoreapp3.1 3.87μs 2.76ns 9.96ns 0.0506 0 0 3.69 KB
#6270 ObjectExtractorMoreComplexBody net472 4.46μs 3.52ns 13.6ns 0.602 0.00666 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 38.2μs 26.2ns 102ns 0.454 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.3μs 36.7ns 142ns 0.432 0 0 32.4 KB
master EncodeArgs net472 66.4μs 27.9ns 104ns 5.15 0.0661 0 32.5 KB
master EncodeLegacyArgs net6.0 76.2μs 407ns 2.11μs 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 109μs 254ns 983ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 154μs 97.1ns 376ns 0.31 0 0 2.15 KB
#6270 EncodeArgs net6.0 37.4μs 23.7ns 88.7ns 0.45 0 0 32.4 KB
#6270 EncodeArgs netcoreapp3.1 54μs 44.6ns 167ns 0.44 0 0 32.4 KB
#6270 EncodeArgs net472 67.6μs 19ns 65.8ns 5.16 0.0675 0 32.5 KB
#6270 EncodeLegacyArgs net6.0 73μs 123ns 478ns 0 0 0 2.14 KB
#6270 EncodeLegacyArgs netcoreapp3.1 105μs 174ns 674ns 0 0 0 2.14 KB
#6270 EncodeLegacyArgs net472 154μs 154ns 597ns 0.308 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 185μs 60.9ns 236ns 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 198μs 238ns 921ns 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 210μs 141ns 545ns 0.315 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 122μs 106ns 381ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 130μs 155ns 598ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 138μs 42.5ns 153ns 0.208 0 0 1.49 KB
#6270 RunWafRealisticBenchmark net6.0 185μs 242ns 938ns 0 0 0 2.44 KB
#6270 RunWafRealisticBenchmark netcoreapp3.1 198μs 208ns 805ns 0 0 0 2.39 KB
#6270 RunWafRealisticBenchmark net472 211μs 221ns 856ns 0.314 0 0 2.46 KB
#6270 RunWafRealisticBenchmarkWithAttack net6.0 122μs 53.6ns 201ns 0 0 0 1.47 KB
#6270 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 323ns 1.25μs 0 0 0 1.46 KB
#6270 RunWafRealisticBenchmarkWithAttack net472 139μs 108ns 418ns 0.207 0 0 1.49 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6270

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 253.95 KB 265.42 KB 11.47 KB 4.52%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 272.91 KB 278.53 KB 5.62 KB 2.06%

Fewer allocations 🎉 in #6270

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 255.27 KB 252.41 KB -2.86 KB -1.12%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 60.49 KB 59.07 KB -1.42 KB -2.34%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 52.9μs 209ns 782ns 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 54.2μs 287ns 1.38μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 38μs 165ns 616ns 0 0 0 60.49 KB
master StringConcatAspectBenchmark net6.0 295μs 4.71μs 43.7μs 0 0 0 253.95 KB
master StringConcatAspectBenchmark netcoreapp3.1 354μs 1.97μs 12.1μs 0 0 0 255.27 KB
master StringConcatAspectBenchmark net472 278μs 6.14μs 58.9μs 0 0 0 272.91 KB
#6270 StringConcatBenchmark net6.0 52.7μs 275ns 1.29μs 0 0 0 43.44 KB
#6270 StringConcatBenchmark netcoreapp3.1 62.4μs 777ns 7.65μs 0 0 0 42.64 KB
#6270 StringConcatBenchmark net472 37.3μs 80.7ns 291ns 0 0 0 59.07 KB
#6270 StringConcatAspectBenchmark net6.0 325μs 1.84μs 12.2μs 0 0 0 265.42 KB
#6270 StringConcatAspectBenchmark netcoreapp3.1 333μs 1.72μs 9.75μs 0 0 0 252.41 KB
#6270 StringConcatAspectBenchmark net472 243μs 1.19μs 5.03μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

andrewlock commented Nov 11, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6270 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.186
  • All benchmarks have the same 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.01μs 45.5ns 334ns 0.0158 0.00792 0 5.61 KB
master StartStopWithChild netcoreapp3.1 9.7μs 46.5ns 246ns 0.0194 0.00485 0 5.8 KB
master StartStopWithChild net472 16.2μs 55.5ns 215ns 1.03 0.292 0.0891 6.21 KB
#6270 StartStopWithChild net6.0 7.84μs 44.3ns 303ns 0.0161 0.00805 0 5.61 KB
#6270 StartStopWithChild netcoreapp3.1 10.2μs 55.3ns 303ns 0.0198 0.00991 0 5.8 KB
#6270 StartStopWithChild net472 16.4μs 59.2ns 229ns 1.06 0.336 0.104 6.21 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 488μs 250ns 934ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 654μs 257ns 926ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 864μs 283ns 1.06μs 0.431 0 0 3.3 KB
#6270 WriteAndFlushEnrichedTraces net6.0 500μs 336ns 1.3μs 0 0 0 2.7 KB
#6270 WriteAndFlushEnrichedTraces netcoreapp3.1 667μs 257ns 996ns 0 0 0 2.7 KB
#6270 WriteAndFlushEnrichedTraces net472 852μs 571ns 2.14μs 0.422 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 151μs 879ns 7.81μs 0.146 0 0 14.47 KB
master SendRequest netcoreapp3.1 173μs 1.01μs 10μs 0.155 0 0 17.27 KB
master SendRequest net472 0.000363ns 0.000352ns 0.00132ns 0 0 0 0 b
#6270 SendRequest net6.0 148μs 859ns 6.97μs 0.144 0 0 14.47 KB
#6270 SendRequest netcoreapp3.1 172μs 1μs 9.25μs 0.158 0 0 17.27 KB
#6270 SendRequest net472 0ns 0ns 0ns 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 556μs 2.12μs 8.2μs 0.571 0 0 41.66 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 676μs 3.09μs 14.8μs 0.37 0 0 41.73 KB
master WriteAndFlushEnrichedTraces net472 892μs 2.61μs 10.1μs 8.04 2.23 0.446 53.32 KB
#6270 WriteAndFlushEnrichedTraces net6.0 557μs 2.92μs 14.3μs 0.543 0 0 41.49 KB
#6270 WriteAndFlushEnrichedTraces netcoreapp3.1 706μs 3.89μs 24.6μs 0.343 0 0 41.72 KB
#6270 WriteAndFlushEnrichedTraces net472 877μs 3.04μs 11.8μs 8.48 2.23 0.446 53.3 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.37μs 1.21ns 4.7ns 0.0144 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.82μs 1.62ns 6.28ns 0.0137 0 0 1.02 KB
master ExecuteNonQuery net472 2.13μs 2.15ns 8.32ns 0.156 0.00108 0 987 B
#6270 ExecuteNonQuery net6.0 1.35μs 1.7ns 6.58ns 0.0139 0 0 1.02 KB
#6270 ExecuteNonQuery netcoreapp3.1 1.78μs 2.08ns 8.05ns 0.014 0 0 1.02 KB
#6270 ExecuteNonQuery net472 2.1μs 1.15ns 4.29ns 0.156 0.00105 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.17μs 0.499ns 1.87ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.58μs 0.727ns 2.72ns 0.0127 0 0 976 B
master CallElasticsearch net472 2.58μs 1.82ns 7.07ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.19μs 0.567ns 2.12ns 0.013 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.6μs 0.717ns 2.78ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.69μs 1.03ns 3.85ns 0.166 0 0 1.05 KB
#6270 CallElasticsearch net6.0 1.22μs 0.584ns 2.19ns 0.0141 0 0 976 B
#6270 CallElasticsearch netcoreapp3.1 1.61μs 0.651ns 2.35ns 0.0129 0 0 976 B
#6270 CallElasticsearch net472 2.67μs 0.935ns 3.62ns 0.158 0 0 995 B
#6270 CallElasticsearchAsync net6.0 1.29μs 0.394ns 1.53ns 0.0135 0 0 952 B
#6270 CallElasticsearchAsync netcoreapp3.1 1.6μs 0.509ns 1.83ns 0.0137 0 0 1.02 KB
#6270 CallElasticsearchAsync net472 2.62μs 0.748ns 2.8ns 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.41μs 0.86ns 3.33ns 0.0135 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.577ns 2.08ns 0.0131 0 0 952 B
master ExecuteAsync net472 1.82μs 0.762ns 2.85ns 0.145 0 0 915 B
#6270 ExecuteAsync net6.0 1.28μs 1.94ns 7.5ns 0.0133 0 0 952 B
#6270 ExecuteAsync netcoreapp3.1 1.66μs 1.84ns 6.88ns 0.0125 0 0 952 B
#6270 ExecuteAsync net472 1.82μs 0.489ns 1.89ns 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.28μs 1.2ns 4.47ns 0.0323 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.42μs 15.4ns 59.8ns 0.0376 0 0 2.85 KB
master SendAsync net472 7.34μs 2.32ns 9ns 0.492 0 0 3.12 KB
#6270 SendAsync net6.0 4.24μs 2.67ns 10ns 0.0318 0 0 2.31 KB
#6270 SendAsync netcoreapp3.1 5.34μs 3.59ns 13.9ns 0.0372 0 0 2.85 KB
#6270 SendAsync net472 7.49μs 1.74ns 6.75ns 0.492 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.45μs 0.784ns 2.83ns 0.0226 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.18μs 0.945ns 3.54ns 0.0218 0 0 1.64 KB
master EnrichedLog net472 2.54μs 1.75ns 6.54ns 0.249 0 0 1.57 KB
#6270 EnrichedLog net6.0 1.61μs 1.3ns 4.88ns 0.0232 0 0 1.64 KB
#6270 EnrichedLog netcoreapp3.1 2.35μs 1.06ns 3.98ns 0.0224 0 0 1.64 KB
#6270 EnrichedLog net472 2.63μs 2.01ns 7.77ns 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 121μs 127ns 492ns 0.0609 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 125μs 212ns 820ns 0 0 0 4.28 KB
master EnrichedLog net472 152μs 141ns 545ns 0.684 0.228 0 4.46 KB
#6270 EnrichedLog net6.0 120μs 142ns 551ns 0.0605 0 0 4.28 KB
#6270 EnrichedLog netcoreapp3.1 123μs 221ns 855ns 0.0613 0 0 4.28 KB
#6270 EnrichedLog net472 151μs 106ns 412ns 0.683 0.228 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.2μs 1ns 3.87ns 0.0304 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.18μs 1.04ns 3.91ns 0.0293 0 0 2.2 KB
master EnrichedLog net472 4.79μs 1.61ns 5.57ns 0.318 0 0 2.02 KB
#6270 EnrichedLog net6.0 3.13μs 0.744ns 2.79ns 0.03 0 0 2.2 KB
#6270 EnrichedLog netcoreapp3.1 4.11μs 1.37ns 5.11ns 0.0288 0 0 2.2 KB
#6270 EnrichedLog net472 4.99μs 1.47ns 5.71ns 0.32 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.33μs 0.772ns 2.99ns 0.0158 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.86μs 0.538ns 2.08ns 0.0148 0 0 1.14 KB
master SendReceive net472 2.06μs 1.59ns 5.95ns 0.183 0 0 1.16 KB
#6270 SendReceive net6.0 1.38μs 0.615ns 2.3ns 0.0159 0 0 1.14 KB
#6270 SendReceive netcoreapp3.1 1.73μs 1.07ns 4.16ns 0.0148 0 0 1.14 KB
#6270 SendReceive net472 2.14μs 3.31ns 12.8ns 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.73μs 0.649ns 2.43ns 0.0218 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.99μs 2.16ns 8.38ns 0.022 0 0 1.65 KB
master EnrichedLog net472 4.29μs 2.27ns 8.48ns 0.322 0 0 2.04 KB
#6270 EnrichedLog net6.0 2.83μs 1.1ns 4.12ns 0.0226 0 0 1.6 KB
#6270 EnrichedLog netcoreapp3.1 4μs 1.63ns 6.3ns 0.0218 0 0 1.65 KB
#6270 EnrichedLog net472 4.55μs 1.61ns 6.22ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6270

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.175 599.32 704.11

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 398ns 0.624ns 2.42ns 0.008 0 0 576 B
master StartFinishSpan netcoreapp3.1 612ns 0.604ns 2.26ns 0.00772 0 0 576 B
master StartFinishSpan net472 599ns 0.633ns 2.37ns 0.0917 0 0 578 B
master StartFinishScope net6.0 482ns 0.756ns 2.93ns 0.00971 0 0 696 B
master StartFinishScope netcoreapp3.1 759ns 0.973ns 3.77ns 0.00945 0 0 696 B
master StartFinishScope net472 919ns 1.84ns 7.11ns 0.104 0 0 658 B
#6270 StartFinishSpan net6.0 391ns 0.512ns 1.98ns 0.008 0 0 576 B
#6270 StartFinishSpan netcoreapp3.1 585ns 1.22ns 4.71ns 0.00778 0 0 576 B
#6270 StartFinishSpan net472 702ns 1.71ns 6.64ns 0.0915 0 0 578 B
#6270 StartFinishScope net6.0 489ns 0.41ns 1.59ns 0.00975 0 0 696 B
#6270 StartFinishScope netcoreapp3.1 756ns 1.42ns 5.49ns 0.00935 0 0 696 B
#6270 StartFinishScope net472 934ns 1.58ns 6.14ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6270

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 1.198 931.98 1,116.18

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 599ns 0.34ns 1.32ns 0.00976 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 930ns 1.45ns 5.23ns 0.00935 0 0 696 B
master RunOnMethodBegin net472 1.13μs 2.19ns 8.49ns 0.104 0 0 658 B
#6270 RunOnMethodBegin net6.0 609ns 1.17ns 4.53ns 0.00968 0 0 696 B
#6270 RunOnMethodBegin netcoreapp3.1 1.12μs 1.93ns 7.47ns 0.00948 0 0 696 B
#6270 RunOnMethodBegin net472 1.19μs 2.53ns 9.81ns 0.104 0 0 658 B

@andrewlock
Copy link
Member

andrewlock commented Nov 11, 2024

Throughput/Crank Report ⚡

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 (6270) (11.093M)   : 0, 11093228
    master (11.155M)   : 0, 11154721
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6270) (7.334M)   : 0, 7333535
    master (7.297M)   : 0, 7297200
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.684M)   : 0, 7684145

    section Manual
    master (11.069M)   : 0, 11068901

    section Manual + Automatic
    This PR (6270) (6.833M)   : 0, 6832574
    master (6.786M)   : 0, 6785523

    section DD_TRACE_ENABLED=0
    master (10.249M)   : 0, 10249493

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6270) (9.620M)   : 0, 9620345
    master (9.602M)   : 0, 9601778
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6270) (6.284M)   : 0, 6284131
    master (6.210M)   : 0, 6209560

    section Trace stats
    master (6.728M)   : 0, 6728350

    section Manual
    master (9.437M)   : 0, 9436743

    section Manual + Automatic
    This PR (6270) (5.858M)   : 0, 5858383
    master (5.810M)   : 0, 5809535

    section DD_TRACE_ENABLED=0
    master (8.705M)   : 0, 8705485

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6270) (10.209M)   : 0, 10208510
    master (10.329M)   : 0, 10328534
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6270) (6.638M)   : 0, 6637878
    master (6.617M)   : 0, 6616689
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.166M)   : 0, 7165623

    section Manual
    master (10.093M)   : 0, 10093300

    section Manual + Automatic
    This PR (6270) (6.227M)   : 0, 6227240
    master (6.311M)   : 0, 6310782

    section DD_TRACE_ENABLED=0
    master (9.459M)   : 0, 9459125

Loading

Copy link
Contributor

@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.

LGTM!

@daniel-romano-DD daniel-romano-DD force-pushed the dani/apm/SkipNetFxDefsInLinux branch 2 times, most recently from 6f9b6c4 to 65e137b Compare November 21, 2024 09:58
@daniel-romano-DD daniel-romano-DD force-pushed the dani/apm/SkipNetFxDefsInLinux branch 3 times, most recently from 3c882e7 to 5b64e6c Compare November 22, 2024 14:25
Base automatically changed from dani/apm/NativeCallTargets to master November 22, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:asm-iast area:builds project files, build scripts, pipelines, versioning, releases, packages 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.

3 participants