dd-trace-dotnet icon indicating copy to clipboard operation
dd-trace-dotnet copied to clipboard

Run CallTargetNativeTests on Windows

Open andrewlock opened this issue 1 year ago • 4 comments

Summary of changes

Runs the CallTargetNativeTests on Windows

Reason for change

We weren't running these on Windows, and we should be

Implementation details

Add the RunOnWindows trait. Longer term I want to reverse the role of this trait, i.e. we run on windows by default and you add RunOnWindows=False to disable that.

Test coverage

More now

Other details

~~I thought we had a bug related to ref structs here, but it appears to be a Schrödinger's bug~~ Oops, no, there it is!

andrewlock avatar Jul 01 '24 09:07 andrewlock

Execution-Time Benchmarks Report :stopwatch:

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 (5754) - mean (70ms)  : 68, 73
     .   : milestone, 70,
    master - mean (70ms)  : 67, 74
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (5754) - mean (1,105ms)  : 1085, 1125
     .   : milestone, 1105,
    master - mean (1,107ms)  : 1086, 1128
     .   : milestone, 1107,

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

    section CallTarget+Inlining+NGEN
    This PR (5754) - mean (774ms)  : 754, 793
     .   : milestone, 774,
    master - mean (774ms)  : 759, 790
     .   : milestone, 774,

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

    section CallTarget+Inlining+NGEN
    This PR (5754) - mean (729ms)  : 713, 745
     .   : milestone, 729,
    master - mean (730ms)  : 712, 747
     .   : milestone, 730,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5754) - mean (233ms)  : 222, 245
     .   : milestone, 233,
    master - mean (190ms)  : 187, 193
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (5754) - mean (1,226ms)  : 1176, 1276
     .   : milestone, 1226,
    master - mean (1,198ms)  : 1174, 1223
     .   : milestone, 1198,

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

    section CallTarget+Inlining+NGEN
    This PR (5754) - mean (940ms)  : 924, 957
     .   : milestone, 940,
    master - mean (940ms)  : 922, 958
     .   : milestone, 940,

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

    section CallTarget+Inlining+NGEN
    This PR (5754) - mean (921ms)  : 899, 943
     .   : milestone, 921,
    master - mean (927ms)  : 909, 944
     .   : milestone, 927,

andrewlock avatar Jul 01 '24 09:07 andrewlock

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 (5754) (11.079M)   : 0, 11078502
    master (11.214M)   : 0, 11213559
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (5754) (7.343M)   : 0, 7343217
    master (7.414M)   : 0, 7414388
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.737M)   : 0, 7737460

    section Manual
    master (11.115M)   : 0, 11114877

    section Manual + Automatic
    This PR (5754) (6.867M)   : 0, 6866852
    master (6.964M)   : 0, 6963791

    section DD_TRACE_ENABLED=0
    master (10.268M)   : 0, 10267825

gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5754) (9.495M)   : 0, 9495139
    master (9.609M)   : 0, 9608747
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (5754) (6.571M)   : 0, 6570532
    master (6.616M)   : 0, 6616057

    section Trace stats
    master (6.832M)   : 0, 6832011

    section Manual
    master (9.547M)   : 0, 9547071

    section Manual + Automatic
    This PR (5754) (6.145M)   : 0, 6144629
    master (6.118M)   : 0, 6117867

    section DD_TRACE_ENABLED=0
    master (9.018M)   : 0, 9018069

gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5754) (10.034M)   : 0, 10034298
    master (10.124M)   : 0, 10123739
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (5754) (6.756M)   : 0, 6756003
    master (6.654M)   : 0, 6653810
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.417M)   : 0, 7416762

    section Manual
    master (9.870M)   : 0, 9869748

    section Manual + Automatic
    This PR (5754) (6.201M)   : 0, 6200617
    master (6.325M)   : 0, 6325090

    section DD_TRACE_ENABLED=0
    master (9.274M)   : 0, 9273906

andrewlock avatar Jul 01 '24 10:07 andrewlock

Datadog Report

Branch report: andrew/ci/run-calltarget-native-tests-on-windows Commit report: 0bf98de Test service: dd-trace-dotnet

:white_check_mark: 0 Failed, 362802 Passed, 2047 Skipped, 16h 1m 24.96s Total Time

datadog-ddstaging[bot] avatar Jul 01 '24 10:07 datadog-ddstaging[bot]

Benchmarks Report for tracer :snail:

Benchmarks for #5754 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.128
  • 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 :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.65μs 43.1ns 314ns 0.0226 0.0113 0 5.42 KB
master StartStopWithChild netcoreapp3.1 10.1μs 54.3ns 277ns 0.0242 0.00484 0 5.62 KB
master StartStopWithChild net472 15.8μs 38.9ns 151ns 1.01 0.297 0.0937 6.07 KB
#5754 StartStopWithChild net6.0 7.76μs 44ns 311ns 0.0191 0.00764 0 5.42 KB
#5754 StartStopWithChild netcoreapp3.1 9.95μs 50ns 212ns 0.0139 0.00463 0 5.62 KB
#5754 StartStopWithChild net472 16μs 47.1ns 182ns 1.01 0.301 0.0951 6.06 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 489μs 191ns 713ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 629μs 209ns 810ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 834μs 600ns 2.24μs 0.419 0 0 3.3 KB
#5754 WriteAndFlushEnrichedTraces net6.0 465μs 174ns 653ns 0 0 0 2.7 KB
#5754 WriteAndFlushEnrichedTraces netcoreapp3.1 655μs 258ns 966ns 0 0 0 2.7 KB
#5754 WriteAndFlushEnrichedTraces net472 834μs 498ns 1.93μs 0.411 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 202μs 1.36μs 13.5μs 0.191 0 0 18.45 KB
master SendRequest netcoreapp3.1 217μs 1.23μs 8.64μs 0.236 0 0 20.61 KB
master SendRequest net472 0.00322ns 0.00136ns 0.00526ns 0 0 0 0 b
#5754 SendRequest net6.0 195μs 1.08μs 6.37μs 0.187 0 0 18.45 KB
#5754 SendRequest netcoreapp3.1 217μs 1.18μs 6.77μs 0.216 0 0 20.61 KB
#5754 SendRequest net472 0.000301ns 0.00022ns 0.000795ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 559μs 2.07μs 7.46μs 0.548 0 0 41.66 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 677μs 3.35μs 14.6μs 0.327 0 0 41.81 KB
master WriteAndFlushEnrichedTraces net472 888μs 1.93μs 7.47μs 8.13 2.57 0.428 53.3 KB
#5754 WriteAndFlushEnrichedTraces net6.0 550μs 2.3μs 8.93μs 0.576 0 0 41.47 KB
#5754 WriteAndFlushEnrichedTraces netcoreapp3.1 684μs 3.29μs 12.8μs 0.34 0 0 41.71 KB
#5754 WriteAndFlushEnrichedTraces net472 848μs 3.82μs 14.8μs 8.45 2.53 0.422 53.3 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.28μs 1.31ns 5.05ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.77μs 2.13ns 8.24ns 0.0132 0 0 1.02 KB
master ExecuteNonQuery net472 2.17μs 1.76ns 6.34ns 0.156 0 0 987 B
#5754 ExecuteNonQuery net6.0 1.41μs 1.72ns 6.67ns 0.014 0 0 1.02 KB
#5754 ExecuteNonQuery netcoreapp3.1 1.78μs 0.82ns 3.07ns 0.0133 0 0 1.02 KB
#5754 ExecuteNonQuery net472 2.11μs 2.4ns 9.3ns 0.157 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.22μs 0.968ns 3.62ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.54μs 0.628ns 2.35ns 0.0134 0 0 976 B
master CallElasticsearch net472 2.43μs 2.47ns 9.56ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.21μs 1.09ns 4.22ns 0.0135 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.67μs 0.907ns 3.39ns 0.0135 0 0 1.02 KB
master CallElasticsearchAsync net472 2.61μs 1.48ns 5.73ns 0.166 0 0 1.05 KB
#5754 CallElasticsearch net6.0 1.17μs 0.851ns 3.07ns 0.0141 0 0 976 B
#5754 CallElasticsearch netcoreapp3.1 1.5μs 0.562ns 2.18ns 0.0135 0 0 976 B
#5754 CallElasticsearch net472 2.48μs 1.87ns 7.25ns 0.157 0 0 995 B
#5754 CallElasticsearchAsync net6.0 1.28μs 0.716ns 2.68ns 0.0135 0 0 952 B
#5754 CallElasticsearchAsync netcoreapp3.1 1.67μs 1.07ns 4.13ns 0.0142 0 0 1.02 KB
#5754 CallElasticsearchAsync net472 2.6μs 1.78ns 6.91ns 0.167 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.37μs 0.831ns 3.11ns 0.0136 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.56ns 2.02ns 0.0129 0 0 952 B
master ExecuteAsync net472 1.8μs 0.733ns 2.74ns 0.145 0 0 915 B
#5754 ExecuteAsync net6.0 1.25μs 0.808ns 3.13ns 0.0132 0 0 952 B
#5754 ExecuteAsync netcoreapp3.1 1.63μs 0.735ns 2.85ns 0.0131 0 0 952 B
#5754 ExecuteAsync net472 1.81μs 0.4ns 1.55ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.25μs 1.9ns 7.11ns 0.032 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.15μs 1.62ns 5.86ns 0.0361 0 0 2.76 KB
master SendAsync net472 7.75μs 1.61ns 6.03ns 0.499 0 0 3.15 KB
#5754 SendAsync net6.0 4.14μs 2.35ns 8.81ns 0.0309 0 0 2.22 KB
#5754 SendAsync netcoreapp3.1 5.09μs 1.56ns 5.82ns 0.0357 0 0 2.76 KB
#5754 SendAsync net472 7.68μs 2.43ns 9.4ns 0.498 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.45μs 0.83ns 3.22ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.09μs 1.02ns 3.96ns 0.0219 0 0 1.64 KB
master EnrichedLog net472 2.48μs 1.7ns 6.57ns 0.249 0 0 1.57 KB
#5754 EnrichedLog net6.0 1.58μs 0.437ns 1.69ns 0.0233 0 0 1.64 KB
#5754 EnrichedLog netcoreapp3.1 2.07μs 1.21ns 4.53ns 0.0219 0 0 1.64 KB
#5754 EnrichedLog net472 2.47μs 0.902ns 3.37ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 116μs 155ns 558ns 0.0573 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 119μs 118ns 441ns 0.0593 0 0 4.28 KB
master EnrichedLog net472 146μs 102ns 380ns 0.656 0.219 0 4.46 KB
#5754 EnrichedLog net6.0 114μs 149ns 576ns 0.0571 0 0 4.28 KB
#5754 EnrichedLog netcoreapp3.1 119μs 252ns 974ns 0 0 0 4.28 KB
#5754 EnrichedLog net472 146μs 194ns 752ns 0.656 0.219 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.17μs 0.998ns 3.86ns 0.0301 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.37μs 0.777ns 2.91ns 0.0283 0 0 2.2 KB
master EnrichedLog net472 4.86μs 2.07ns 8.02ns 0.319 0 0 2.02 KB
#5754 EnrichedLog net6.0 3.03μs 0.782ns 2.93ns 0.0303 0 0 2.2 KB
#5754 EnrichedLog netcoreapp3.1 4.15μs 1.13ns 4.09ns 0.0292 0 0 2.2 KB
#5754 EnrichedLog net472 4.73μs 1.52ns 5.89ns 0.32 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.34μs 0.695ns 2.69ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.76μs 1.15ns 4.46ns 0.0149 0 0 1.14 KB
master SendReceive net472 2.04μs 1.95ns 7.55ns 0.183 0 0 1.16 KB
#5754 SendReceive net6.0 1.32μs 0.971ns 3.76ns 0.0158 0 0 1.14 KB
#5754 SendReceive netcoreapp3.1 1.71μs 1.14ns 4.42ns 0.0153 0 0 1.14 KB
#5754 SendReceive net472 2.12μs 0.748ns 2.8ns 0.183 0.00106 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.72μs 0.942ns 3.53ns 0.0217 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.91μs 1.6ns 6.21ns 0.0216 0 0 1.65 KB
master EnrichedLog net472 4.33μs 2.71ns 10.5ns 0.322 0 0 2.04 KB
#5754 EnrichedLog net6.0 2.69μs 1.99ns 7.46ns 0.0229 0 0 1.6 KB
#5754 EnrichedLog netcoreapp3.1 3.92μs 0.809ns 3.13ns 0.0216 0 0 1.65 KB
#5754 EnrichedLog net472 4.34μs 3.11ns 12.1ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #5754

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.128 650.15 576.45

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 399ns 0.317ns 1.23ns 0.0081 0 0 576 B
master StartFinishSpan netcoreapp3.1 594ns 0.511ns 1.91ns 0.00785 0 0 576 B
master StartFinishSpan net472 650ns 0.638ns 2.47ns 0.0917 0 0 578 B
master StartFinishScope net6.0 494ns 0.159ns 0.596ns 0.00964 0 0 696 B
master StartFinishScope netcoreapp3.1 794ns 0.664ns 2.49ns 0.00925 0 0 696 B
master StartFinishScope net472 877ns 1.32ns 5.13ns 0.104 0 0 658 B
#5754 StartFinishSpan net6.0 404ns 0.177ns 0.64ns 0.00801 0 0 576 B
#5754 StartFinishSpan netcoreapp3.1 569ns 0.731ns 2.73ns 0.0077 0 0 576 B
#5754 StartFinishSpan net472 576ns 0.734ns 2.84ns 0.0918 0 0 578 B
#5754 StartFinishScope net6.0 472ns 0.376ns 1.46ns 0.00968 0 0 696 B
#5754 StartFinishScope netcoreapp3.1 753ns 0.743ns 2.78ns 0.0094 0 0 696 B
#5754 StartFinishScope net472 886ns 0.872ns 3.38ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 639ns 0.671ns 2.6ns 0.00966 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 907ns 1.63ns 6.33ns 0.00916 0 0 696 B
master RunOnMethodBegin net472 1.06μs 1.28ns 4.96ns 0.104 0 0 658 B
#5754 RunOnMethodBegin net6.0 633ns 0.775ns 3ns 0.00981 0 0 696 B
#5754 RunOnMethodBegin netcoreapp3.1 987ns 0.889ns 3.44ns 0.00893 0 0 696 B
#5754 RunOnMethodBegin net472 1.07μs 1.49ns 5.78ns 0.104 0 0 658 B

andrewlock avatar Jul 01 '24 11:07 andrewlock