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

Tony/civisibility alternate assembly experiment

Open tonyredondo opened this issue 11 months ago • 3 comments

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

tonyredondo avatar Jan 15 '25 14:01 tonyredondo

Datadog Report

Branch report: tony/civisibility-alternate-assembly-experiment Commit report: 60b167c Test service: dd-trace-dotnet

:x: 2 Failed (0 Known Flaky), 17432 Passed, 288 Skipped, 5h 34m 9.03s Total Time

:x: Failed Tests (2)

  • SubmitsDsmMetrics - Datadog.Trace.ClrProfiler.IntegrationTests.AWS.DataStreamsMonitoringAwsKinesisTests - Details

    Expand for error
    xpected exit code: 0, actual exit code: 134.
    
  • SubmitsDsmMetrics - Datadog.Trace.ClrProfiler.IntegrationTests.AWS.DataStreamsMonitoringAwsKinesisTests - Details

    Expand for error
    xpected exit code: 0, actual exit code: 134.
    

datadog-ddstaging[bot] avatar Jan 15 '25 15:01 datadog-ddstaging[bot]

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 (6554) - mean (70ms)  : 64, 75
     .   : milestone, 70,
    master - mean (69ms)  : 66, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6554) - mean (981ms)  : 957, 1005
     .   : milestone, 981,
    master - mean (985ms)  : 956, 1013
     .   : milestone, 985,

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

    section CallTarget+Inlining+NGEN
    This PR (6554) - mean (678ms)  : 664, 693
     .   : milestone, 678,
    master - mean (678ms)  : 666, 691
     .   : milestone, 678,

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

    section CallTarget+Inlining+NGEN
    This PR (6554) - mean (631ms)  : 618, 645
     .   : milestone, 631,
    master - mean (636ms)  : 617, 655
     .   : milestone, 636,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6554) - mean (190ms)  : 186, 194
     .   : milestone, 190,
    master - mean (190ms)  : 185, 195
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6554) - mean (1,090ms)  : 1062, 1117
     .   : milestone, 1090,
    master - mean (1,085ms)  : 1059, 1111
     .   : milestone, 1085,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6554) - mean (275ms)  : 270, 279
     .   : milestone, 275,
    master - mean (275ms)  : 270, 280
     .   : milestone, 275,

    section CallTarget+Inlining+NGEN
    This PR (6554) - mean (864ms)  : 834, 894
     .   : milestone, 864,
    master - mean (869ms)  : 845, 893
     .   : milestone, 869,

gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6554) - mean (263ms)  : 259, 267
     .   : milestone, 263,
    master - mean (263ms)  : 259, 267
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6554) - mean (841ms)  : 814, 869
     .   : milestone, 841,
    master - mean (847ms)  : 819, 876
     .   : milestone, 847,

andrewlock avatar Jan 15 '25 16:01 andrewlock

Benchmarks Report for tracer :snail:

Benchmarks for #6554 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.114
  • 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 8.32μs 44.7ns 253ns 0.0165 0.00824 0 5.62 KB
master StartStopWithChild netcoreapp3.1 10.2μs 50.7ns 287ns 0.0199 0.00993 0 5.8 KB
master StartStopWithChild net472 16.3μs 35.3ns 137ns 1.06 0.307 0.102 6.21 KB
#6554 StartStopWithChild net6.0 8.31μs 46ns 276ns 0.0167 0.00834 0 5.61 KB
#6554 StartStopWithChild netcoreapp3.1 10.3μs 54.9ns 275ns 0.0206 0.0103 0 5.8 KB
#6554 StartStopWithChild net472 16.5μs 41.5ns 161ns 1.05 0.315 0.0913 6.2 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 470μs 385ns 1.49μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 662μs 269ns 1.04μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 859μs 722ns 2.79μs 0.428 0 0 3.3 KB
#6554 WriteAndFlushEnrichedTraces net6.0 488μs 496ns 1.85μs 0 0 0 2.7 KB
#6554 WriteAndFlushEnrichedTraces netcoreapp3.1 668μs 447ns 1.73μs 0 0 0 2.7 KB
#6554 WriteAndFlushEnrichedTraces net472 855μs 687ns 2.66μs 0.425 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 157μs 923ns 8.71μs 0.147 0 0 14.47 KB
master SendRequest netcoreapp3.1 175μs 1.12μs 11.1μs 0.191 0 0 17.27 KB
master SendRequest net472 0.00137ns 0.000761ns 0.00285ns 0 0 0 0 b
#6554 SendRequest net6.0 155μs 909ns 8.63μs 0.148 0 0 14.47 KB
#6554 SendRequest netcoreapp3.1 171μs 1.15μs 11.4μs 0.189 0 0 17.27 KB
#6554 SendRequest net472 0.00213ns 0.000725ns 0.00281ns 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 571μs 2.67μs 10μs 0.584 0 0 41.6 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 695μs 3.86μs 23.5μs 0.353 0 0 41.76 KB
master WriteAndFlushEnrichedTraces net472 825μs 2.97μs 10.7μs 8.5 2.55 0.425 53.27 KB
#6554 WriteAndFlushEnrichedTraces net6.0 586μs 3.15μs 18.6μs 0.59 0 0 41.8 KB
#6554 WriteAndFlushEnrichedTraces netcoreapp3.1 680μs 3.88μs 28μs 0.332 0 0 41.8 KB
#6554 WriteAndFlushEnrichedTraces net472 834μs 3.22μs 12.5μs 8.22 2.47 0.411 53.25 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.32μs 1ns 3.87ns 0.0147 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.77μs 1.85ns 6.92ns 0.0133 0 0 1.02 KB
master ExecuteNonQuery net472 2.06μs 3.08ns 11.9ns 0.156 0.00102 0 987 B
#6554 ExecuteNonQuery net6.0 1.31μs 2.14ns 8.28ns 0.0144 0 0 1.02 KB
#6554 ExecuteNonQuery netcoreapp3.1 1.79μs 2.55ns 9.86ns 0.0135 0 0 1.02 KB
#6554 ExecuteNonQuery net472 2.11μs 2.08ns 8.04ns 0.156 0.00105 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.26μs 1.05ns 3.94ns 0.0133 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.57μs 1.18ns 4.58ns 0.0132 0 0 976 B
master CallElasticsearch net472 2.64μs 1.83ns 7.08ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.28μs 0.793ns 2.97ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.59μs 0.636ns 2.38ns 0.0135 0 0 1.02 KB
master CallElasticsearchAsync net472 2.65μs 2.23ns 8.62ns 0.166 0 0 1.05 KB
#6554 CallElasticsearch net6.0 1.23μs 0.526ns 2.04ns 0.0136 0 0 976 B
#6554 CallElasticsearch netcoreapp3.1 1.57μs 2.01ns 7.8ns 0.0131 0 0 976 B
#6554 CallElasticsearch net472 2.61μs 1.92ns 7.17ns 0.158 0 0 995 B
#6554 CallElasticsearchAsync net6.0 1.24μs 0.831ns 3.11ns 0.0136 0 0 952 B
#6554 CallElasticsearchAsync netcoreapp3.1 1.63μs 0.76ns 2.84ns 0.0138 0 0 1.02 KB
#6554 CallElasticsearchAsync net472 2.7μs 1.39ns 5.2ns 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.23μs 0.583ns 2.18ns 0.0132 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.57μs 2.12ns 7.92ns 0.0126 0 0 952 B
master ExecuteAsync net472 1.83μs 0.494ns 1.91ns 0.145 0 0 915 B
#6554 ExecuteAsync net6.0 1.21μs 0.595ns 2.22ns 0.0133 0 0 952 B
#6554 ExecuteAsync netcoreapp3.1 1.66μs 0.752ns 2.71ns 0.0124 0 0 952 B
#6554 ExecuteAsync net472 1.84μs 1.36ns 5.26ns 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.4μs 2.07ns 7.76ns 0.0325 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.21μs 1.27ns 4.76ns 0.039 0 0 2.85 KB
master SendAsync net472 7.35μs 2.08ns 8.06ns 0.493 0 0 3.12 KB
#6554 SendAsync net6.0 4.42μs 1.04ns 4.03ns 0.0332 0 0 2.31 KB
#6554 SendAsync netcoreapp3.1 5.34μs 1.94ns 7.53ns 0.0373 0 0 2.85 KB
#6554 SendAsync net472 7.33μs 2ns 7.48ns 0.494 0 0 3.12 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.5μs 0.724ns 2.8ns 0.0233 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.24μs 5.12ns 19.8ns 0.022 0 0 1.64 KB
master EnrichedLog net472 2.63μs 1.34ns 5.19ns 0.25 0 0 1.57 KB
#6554 EnrichedLog net6.0 1.49μs 1.07ns 4.14ns 0.0232 0 0 1.64 KB
#6554 EnrichedLog netcoreapp3.1 2.14μs 0.7ns 2.71ns 0.0224 0 0 1.64 KB
#6554 EnrichedLog net472 2.61μs 0.914ns 3.42ns 0.25 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 117μs 178ns 689ns 0.0579 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 186ns 722ns 0 0 0 4.28 KB
master EnrichedLog net472 150μs 117ns 452ns 0.684 0.228 0 4.46 KB
#6554 EnrichedLog net6.0 116μs 155ns 600ns 0.0582 0 0 4.28 KB
#6554 EnrichedLog netcoreapp3.1 121μs 220ns 852ns 0.0598 0 0 4.28 KB
#6554 EnrichedLog net472 152μs 194ns 750ns 0.682 0.227 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 2.98μs 0.65ns 2.52ns 0.0299 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.33μs 2.1ns 8.15ns 0.0281 0 0 2.2 KB
master EnrichedLog net472 4.88μs 1.59ns 6.17ns 0.319 0 0 2.02 KB
#6554 EnrichedLog net6.0 3.03μs 1.03ns 3.87ns 0.0299 0 0 2.2 KB
#6554 EnrichedLog netcoreapp3.1 4.15μs 2.78ns 10.8ns 0.029 0 0 2.2 KB
#6554 EnrichedLog net472 4.83μs 1.34ns 5.18ns 0.321 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.3μs 0.604ns 2.34ns 0.0162 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.78μs 1.7ns 6.38ns 0.0154 0 0 1.14 KB
master SendReceive net472 2.11μs 1.65ns 6.4ns 0.183 0 0 1.16 KB
#6554 SendReceive net6.0 1.37μs 0.795ns 3.08ns 0.0157 0 0 1.14 KB
#6554 SendReceive netcoreapp3.1 1.76μs 0.858ns 3.21ns 0.015 0 0 1.14 KB
#6554 SendReceive net472 2μs 0.866ns 3.24ns 0.183 0 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.82μs 1.48ns 5.72ns 0.0225 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.91μs 2.99ns 11.6ns 0.0214 0 0 1.65 KB
master EnrichedLog net472 4.35μs 2.51ns 9.73ns 0.322 0 0 2.04 KB
#6554 EnrichedLog net6.0 2.59μs 0.47ns 1.76ns 0.0221 0 0 1.6 KB
#6554 EnrichedLog netcoreapp3.1 3.86μs 2.15ns 8.32ns 0.0213 0 0 1.65 KB
#6554 EnrichedLog net472 4.43μs 2.06ns 7.98ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #6554

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.114 541.58 486.13

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 398ns 0.155ns 0.602ns 0.00819 0 0 576 B
master StartFinishSpan netcoreapp3.1 615ns 0.451ns 1.75ns 0.00767 0 0 576 B
master StartFinishSpan net472 700ns 0.374ns 1.4ns 0.0917 0 0 578 B
master StartFinishScope net6.0 542ns 0.325ns 1.22ns 0.00975 0 0 696 B
master StartFinishScope netcoreapp3.1 718ns 0.412ns 1.49ns 0.00946 0 0 696 B
master StartFinishScope net472 884ns 0.661ns 2.56ns 0.104 0 0 658 B
#6554 StartFinishSpan net6.0 400ns 0.323ns 1.25ns 0.0081 0 0 576 B
#6554 StartFinishSpan netcoreapp3.1 596ns 1.04ns 4.02ns 0.00785 0 0 576 B
#6554 StartFinishSpan net472 661ns 1.8ns 6.96ns 0.0915 0 0 578 B
#6554 StartFinishScope net6.0 486ns 0.241ns 0.9ns 0.0098 0 0 696 B
#6554 StartFinishScope netcoreapp3.1 748ns 0.592ns 2.29ns 0.00937 0 0 696 B
#6554 StartFinishScope net472 875ns 2.45ns 9.5ns 0.105 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 667ns 0.353ns 1.32ns 0.00969 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 876ns 0.706ns 2.74ns 0.00922 0 0 696 B
master RunOnMethodBegin net472 1.07μs 0.659ns 2.55ns 0.104 0 0 658 B
#6554 RunOnMethodBegin net6.0 682ns 1.24ns 4.8ns 0.00981 0 0 696 B
#6554 RunOnMethodBegin netcoreapp3.1 956ns 1.55ns 5.98ns 0.00913 0 0 696 B
#6554 RunOnMethodBegin net472 1.07μs 1.92ns 7.45ns 0.104 0 0 658 B

andrewlock avatar Jan 16 '25 01:01 andrewlock