[Tracer] Improve startup time
Summary of changes
Modified code generators to also generate CallTargets and CallSites in .h files, so they can be embedded directly in the Native library avoiding the need to marshall them from the managed side
Reason for change
Marshalling around 2k strings in init time takes a toll. Embedding them in the native side can make that step unnecesary.
Implementation details
Aspects and Instrumentation code gen produce g.cs and .h files with all the definitions. Native library include the generated .h files on its compilation. In the case of library version mismatch, managed instrumentations are fed by the oldest method
Test coverage
Other details
Datadog Report
Branch report: dani/apm/native_definitions
Commit report: a641f6e
Test service: dd-trace-dotnet
:white_check_mark: 0 Failed, 354430 Passed, 2557 Skipped, 24h 33m 1.01s Total Time
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 (5785) - mean (76ms) : 66, 85
. : milestone, 76,
master - mean (75ms) : 64, 87
. : milestone, 75,
section CallTarget+Inlining+NGEN
This PR (5785) - mean (938ms) : 914, 961
. : milestone, 938,
master - mean (1,048ms) : 1030, 1067
. : milestone, 1048,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5785) - mean (110ms) : 107, 113
. : milestone, 110,
master - mean (112ms) : 108, 116
. : milestone, 112,
section CallTarget+Inlining+NGEN
This PR (5785) - mean (655ms) : 637, 673
. : milestone, 655,
master - mean (735ms) : 713, 756
. : milestone, 735,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5785) - mean (94ms) : 91, 96
. : milestone, 94,
master - mean (95ms) : 92, 98
. : milestone, 95,
section CallTarget+Inlining+NGEN
This PR (5785) - mean (616ms) : 598, 634
. : milestone, 616,
master - mean (688ms) : 661, 716
. : milestone, 688,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5785) - mean (193ms) : 189, 196
. : milestone, 193,
master - mean (192ms) : 187, 196
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5785) - mean (1,053ms) : 1025, 1081
. : milestone, 1053,
master - mean (1,160ms) : 1140, 1180
. : milestone, 1160,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5785) - mean (277ms) : 272, 282
. : milestone, 277,
master - mean (277ms) : 273, 281
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (5785) - mean (876ms) : 850, 901
. : milestone, 876,
master - mean (949ms) : 930, 967
. : milestone, 949,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5785) - mean (265ms) : 260, 270
. : milestone, 265,
master - mean (265ms) : 260, 269
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (5785) - mean (853ms) : 825, 881
. : milestone, 853,
master - mean (922ms) : 902, 941
. : milestone, 922,
Benchmarks Report for appsec :snail:
Benchmarks for #5785 compared to master:
- All benchmarks have the same speed
- 1 benchmarks have fewer allocations
- 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.Asm.AppSecBodyBenchmark - 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 | AllCycleSimpleBody |
net6.0 | 72.4μs | 94.5ns | 354ns | 0.0724 | 0 | 0 | 6.01 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 61.8μs | 102ns | 395ns | 0.0931 | 0 | 0 | 6.95 KB |
| master | AllCycleSimpleBody |
net472 | 48.5μs | 57.1ns | 221ns | 1.3 | 0 | 0 | 8.34 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 78.8μs | 93.4ns | 362ns | 0.117 | 0 | 0 | 9.51 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 69.9μs | 89.1ns | 345ns | 0.105 | 0 | 0 | 10.36 KB |
| master | AllCycleMoreComplexBody |
net472 | 55.8μs | 45.6ns | 171ns | 1.87 | 0.0279 | 0 | 11.85 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 141ns | 0.155ns | 0.601ns | 0.00391 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 202ns | 0.162ns | 0.606ns | 0.00378 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 164ns | 0.109ns | 0.409ns | 0.0446 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 3.13μs | 1.55ns | 5.78ns | 0.0529 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.98μs | 7.22ns | 28ns | 0.0516 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 4.11μs | 3.75ns | 13.5ns | 0.601 | 0.00614 | 0 | 3.8 KB |
| #5785 | AllCycleSimpleBody |
net6.0 | 73.6μs | 95.7ns | 358ns | 0.0737 | 0 | 0 | 6 KB |
| #5785 | AllCycleSimpleBody |
netcoreapp3.1 | 61.8μs | 68.4ns | 265ns | 0.0934 | 0 | 0 | 6.95 KB |
| #5785 | AllCycleSimpleBody |
net472 | 49μs | 50.8ns | 197ns | 1.31 | 0 | 0 | 8.34 KB |
| #5785 | AllCycleMoreComplexBody |
net6.0 | 80.7μs | 109ns | 421ns | 0.118 | 0 | 0 | 9.51 KB |
| #5785 | AllCycleMoreComplexBody |
netcoreapp3.1 | 70μs | 72.4ns | 280ns | 0.139 | 0 | 0 | 10.36 KB |
| #5785 | AllCycleMoreComplexBody |
net472 | 56.2μs | 81.1ns | 314ns | 1.86 | 0.0282 | 0 | 11.85 KB |
| #5785 | ObjectExtractorSimpleBody |
net6.0 | 140ns | 0.125ns | 0.483ns | 0.00397 | 0 | 0 | 280 B |
| #5785 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 202ns | 0.209ns | 0.782ns | 0.00374 | 0 | 0 | 272 B |
| #5785 | ObjectExtractorSimpleBody |
net472 | 166ns | 0.113ns | 0.436ns | 0.0446 | 0 | 0 | 281 B |
| #5785 | ObjectExtractorMoreComplexBody |
net6.0 | 3.02μs | 1.35ns | 5.06ns | 0.0527 | 0 | 0 | 3.78 KB |
| #5785 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.94μs | 3.1ns | 12ns | 0.0512 | 0 | 0 | 3.69 KB |
| #5785 | ObjectExtractorMoreComplexBody |
net472 | 4.11μs | 3.09ns | 12ns | 0.601 | 0.00618 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - 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 | EncodeArgs |
net6.0 | 39μs | 12.8ns | 48.1ns | 0.451 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 54μs | 23.9ns | 92.7ns | 0.431 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 65.6μs | 48.7ns | 189ns | 5.15 | 0.0652 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 71μs | 15.7ns | 54.5ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 109μs | 90.9ns | 352ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
net472 | 152μs | 53.3ns | 206ns | 0.304 | 0 | 0 | 2.15 KB |
| #5785 | EncodeArgs |
net6.0 | 37.5μs | 24.9ns | 96.6ns | 0.449 | 0 | 0 | 32.4 KB |
| #5785 | EncodeArgs |
netcoreapp3.1 | 54.1μs | 28.4ns | 106ns | 0.433 | 0 | 0 | 32.4 KB |
| #5785 | EncodeArgs |
net472 | 65μs | 25.2ns | 97.7ns | 5.14 | 0.0651 | 0 | 32.5 KB |
| #5785 | EncodeLegacyArgs |
net6.0 | 76.4μs | 165ns | 640ns | 0 | 0 | 0 | 2.14 KB |
| #5785 | EncodeLegacyArgs |
netcoreapp3.1 | 106μs | 171ns | 664ns | 0 | 0 | 0 | 2.14 KB |
| #5785 | EncodeLegacyArgs |
net472 | 151μs | 65ns | 252ns | 0.3 | 0 | 0 | 2.15 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - 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 | RunWafRealisticBenchmark |
net6.0 | 185μs | 249ns | 965ns | 0 | 0 | 0 | 2.42 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 192μs | 210ns | 786ns | 0 | 0 | 0 | 2.37 KB |
| master | RunWafRealisticBenchmark |
net472 | 206μs | 49.3ns | 191ns | 0.309 | 0 | 0 | 2.43 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 122μs | 110ns | 411ns | 0 | 0 | 0 | 1.46 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 129μs | 33.6ns | 121ns | 0 | 0 | 0 | 1.45 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 140μs | 36.9ns | 138ns | 0.209 | 0 | 0 | 1.48 KB |
| #5785 | RunWafRealisticBenchmark |
net6.0 | 181μs | 129ns | 499ns | 0 | 0 | 0 | 2.42 KB |
| #5785 | RunWafRealisticBenchmark |
netcoreapp3.1 | 193μs | 310ns | 1.2μs | 0 | 0 | 0 | 2.37 KB |
| #5785 | RunWafRealisticBenchmark |
net472 | 209μs | 206ns | 799ns | 0.315 | 0 | 0 | 2.43 KB |
| #5785 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 122μs | 139ns | 503ns | 0 | 0 | 0 | 1.46 KB |
| #5785 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 128μs | 43.7ns | 164ns | 0 | 0 | 0 | 1.45 KB |
| #5785 | RunWafRealisticBenchmarkWithAttack |
net472 | 139μs | 83.9ns | 325ns | 0.207 | 0 | 0 | 1.48 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #5785
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
59.14 KB
61.7 KB
2.56 KB
4.33%
Fewer allocations :tada: in #5785
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
264.91 KB
252.85 KB
-12.06 KB
-4.55%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 58.9μs | 660ns | 6.57μs | 0 | 0 | 0 | 43.44 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 67.4μs | 921ns | 9.02μs | 0 | 0 | 0 | 42.64 KB |
| master | StringConcatBenchmark |
net472 | 37.5μs | 70.1ns | 262ns | 0 | 0 | 0 | 59.14 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 302μs | 1.58μs | 10.1μs | 0 | 0 | 0 | 254.48 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 340μs | 1.76μs | 11.4μs | 0 | 0 | 0 | 264.91 KB |
| master | StringConcatAspectBenchmark |
net472 | 303μs | 7.78μs | 75.1μs | 0 | 0 | 0 | 278.53 KB |
| #5785 | StringConcatBenchmark |
net6.0 | 51.8μs | 224ns | 868ns | 0 | 0 | 0 | 43.44 KB |
| #5785 | StringConcatBenchmark |
netcoreapp3.1 | 62.1μs | 952ns | 9.33μs | 0 | 0 | 0 | 42.64 KB |
| #5785 | StringConcatBenchmark |
net472 | 37μs | 110ns | 410ns | 0 | 0 | 0 | 61.7 KB |
| #5785 | StringConcatAspectBenchmark |
net6.0 | 263μs | 4.66μs | 44.4μs | 0 | 0 | 0 | 253.99 KB |
| #5785 | StringConcatAspectBenchmark |
netcoreapp3.1 | 326μs | 997ns | 3.45μs | 0 | 0 | 0 | 252.85 KB |
| #5785 | StringConcatAspectBenchmark |
net472 | 278μs | 5.38μs | 51μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks Report for tracer :snail:
Benchmarks for #5785 compared to master:
- 1 benchmarks are faster, with geometric mean 1.208
- 3 benchmarks are slower, with geometric mean 1.160
- 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.59μs | 42.9ns | 300ns | 0.0155 | 0.00775 | 0 | 5.43 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 9.66μs | 50.7ns | 243ns | 0.019 | 0.00476 | 0 | 5.62 KB |
| master | StartStopWithChild |
net472 | 16μs | 58.1ns | 225ns | 1.03 | 0.321 | 0.094 | 6.08 KB |
| #5785 | StartStopWithChild |
net6.0 | 7.66μs | 43.9ns | 334ns | 0.0116 | 0.00386 | 0 | 5.42 KB |
| #5785 | StartStopWithChild |
netcoreapp3.1 | 10μs | 57.3ns | 433ns | 0.0149 | 0.00496 | 0 | 5.62 KB |
| #5785 | StartStopWithChild |
net472 | 16.2μs | 47.3ns | 177ns | 1.02 | 0.307 | 0.0968 | 6.07 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 | 473μs | 300ns | 1.16μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 645μs | 241ns | 902ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 833μs | 599ns | 2.32μs | 0.419 | 0 | 0 | 3.3 KB |
| #5785 | WriteAndFlushEnrichedTraces |
net6.0 | 477μs | 157ns | 568ns | 0 | 0 | 0 | 2.7 KB |
| #5785 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 632μs | 125ns | 468ns | 0 | 0 | 0 | 2.7 KB |
| #5785 | WriteAndFlushEnrichedTraces |
net472 | 845μs | 271ns | 978ns | 0.422 | 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 | 173μs | 260ns | 1.01μs | 0.261 | 0 | 0 | 18.45 KB |
| master | SendRequest |
netcoreapp3.1 | 192μs | 355ns | 1.37μs | 0.193 | 0 | 0 | 20.61 KB |
| master | SendRequest |
net472 | 0.00151ns | 0.000154ns | 0.000576ns | 0 | 0 | 0 | 0 b |
| #5785 | SendRequest |
net6.0 | 171μs | 270ns | 1.05μs | 0.257 | 0 | 0 | 18.45 KB |
| #5785 | SendRequest |
netcoreapp3.1 | 192μs | 367ns | 1.42μs | 0.193 | 0 | 0 | 20.61 KB |
| #5785 | SendRequest |
net472 | 0.00154ns | 0.000526ns | 0.00204ns | 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 | 560μs | 238ns | 922ns | 0.563 | 0 | 0 | 41.69 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 666μs | 1.33μs | 5.13μs | 0.336 | 0 | 0 | 41.76 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 836μs | 2.08μs | 7.79μs | 8.28 | 2.48 | 0.414 | 53.24 KB |
| #5785 | WriteAndFlushEnrichedTraces |
net6.0 | 557μs | 697ns | 2.7μs | 0.541 | 0 | 0 | 41.64 KB |
| #5785 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 655μs | 922ns | 3.57μs | 0.326 | 0 | 0 | 41.66 KB |
| #5785 | WriteAndFlushEnrichedTraces |
net472 | 847μs | 3.02μs | 11.7μs | 8.39 | 2.52 | 0.419 | 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.16μs | 0.356ns | 1.38ns | 0.0144 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 1.65μs | 0.901ns | 3.49ns | 0.0132 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 1.96μs | 0.471ns | 1.76ns | 0.157 | 0 | 0 | 987 B |
| #5785 | ExecuteNonQuery |
net6.0 | 1.13μs | 0.499ns | 1.93ns | 0.0145 | 0 | 0 | 1.02 KB |
| #5785 | ExecuteNonQuery |
netcoreapp3.1 | 1.62μs | 0.916ns | 3.55ns | 0.0137 | 0 | 0 | 1.02 KB |
| #5785 | ExecuteNonQuery |
net472 | 1.96μs | 4.66ns | 18ns | 0.156 | 0 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Slower :warning: Same allocations :heavy_check_mark:
Slower :warning: in #5785
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.148
1,099.54
1,262.26
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.1μs | 0.326ns | 1.26ns | 0.0138 | 0 | 0 | 976 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.53μs | 0.711ns | 2.66ns | 0.0129 | 0 | 0 | 976 B |
| master | CallElasticsearch |
net472 | 2.54μs | 0.929ns | 3.48ns | 0.157 | 0 | 0 | 995 B |
| master | CallElasticsearchAsync |
net6.0 | 1.25μs | 0.999ns | 3.74ns | 0.0131 | 0 | 0 | 952 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 1.63μs | 0.691ns | 2.68ns | 0.0131 | 0 | 0 | 1.02 KB |
| master | CallElasticsearchAsync |
net472 | 2.67μs | 1.16ns | 4.51ns | 0.167 | 0 | 0 | 1.05 KB |
| #5785 | CallElasticsearch |
net6.0 | 1.26μs | 1.55ns | 5.78ns | 0.0134 | 0 | 0 | 976 B |
| #5785 | CallElasticsearch |
netcoreapp3.1 | 1.54μs | 3.86ns | 15ns | 0.0129 | 0 | 0 | 976 B |
| #5785 | CallElasticsearch |
net472 | 2.45μs | 1.56ns | 5.83ns | 0.157 | 0 | 0 | 995 B |
| #5785 | CallElasticsearchAsync |
net6.0 | 1.25μs | 0.451ns | 1.63ns | 0.0131 | 0 | 0 | 952 B |
| #5785 | CallElasticsearchAsync |
netcoreapp3.1 | 1.65μs | 0.82ns | 3.07ns | 0.0133 | 0 | 0 | 1.02 KB |
| #5785 | CallElasticsearchAsync |
net472 | 2.67μs | 0.746ns | 2.58ns | 0.167 | 0 | 0 | 1.05 KB |
Benchmarks.Trace.GraphQLBenchmark - Faster :tada: Same allocations :heavy_check_mark:
Faster :tada: in #5785
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0
1.208
1,371.07
1,135.45
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.37μs | 0.692ns | 2.49ns | 0.0131 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 1.56μs | 1ns | 3.6ns | 0.0126 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 1.83μs | 0.835ns | 3.12ns | 0.145 | 0 | 0 | 915 B |
| #5785 | ExecuteAsync |
net6.0 | 1.14μs | 0.369ns | 1.38ns | 0.0137 | 0 | 0 | 952 B |
| #5785 | ExecuteAsync |
netcoreapp3.1 | 1.65μs | 0.976ns | 3.65ns | 0.0131 | 0 | 0 | 952 B |
| #5785 | ExecuteAsync |
net472 | 1.79μs | 0.691ns | 2.68ns | 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.17μs | 1.36ns | 5.08ns | 0.0311 | 0 | 0 | 2.22 KB |
| master | SendAsync |
netcoreapp3.1 | 5.11μs | 2.17ns | 8.39ns | 0.0356 | 0 | 0 | 2.76 KB |
| master | SendAsync |
net472 | 7.9μs | 1.23ns | 4.75ns | 0.496 | 0 | 0 | 3.15 KB |
| #5785 | SendAsync |
net6.0 | 4.07μs | 1.89ns | 7.06ns | 0.0305 | 0 | 0 | 2.22 KB |
| #5785 | SendAsync |
netcoreapp3.1 | 5.07μs | 1.59ns | 6.17ns | 0.0379 | 0 | 0 | 2.76 KB |
| #5785 | SendAsync |
net472 | 7.75μs | 1.51ns | 5.83ns | 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.42μs | 0.433ns | 1.56ns | 0.0228 | 0 | 0 | 1.64 KB |
| master | EnrichedLog |
netcoreapp3.1 | 2.26μs | 0.907ns | 3.4ns | 0.0214 | 0 | 0 | 1.64 KB |
| master | EnrichedLog |
net472 | 2.5μs | 2.17ns | 8.39ns | 0.249 | 0 | 0 | 1.57 KB |
| #5785 | EnrichedLog |
net6.0 | 1.43μs | 1ns | 3.75ns | 0.0233 | 0 | 0 | 1.64 KB |
| #5785 | EnrichedLog |
netcoreapp3.1 | 2.2μs | 3.79ns | 14.7ns | 0.0219 | 0 | 0 | 1.64 KB |
| #5785 | EnrichedLog |
net472 | 2.54μs | 2.6ns | 10.1ns | 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 | 240ns | 930ns | 0.0578 | 0 | 0 | 4.28 KB |
| master | EnrichedLog |
netcoreapp3.1 | 120μs | 233ns | 903ns | 0 | 0 | 0 | 4.28 KB |
| master | EnrichedLog |
net472 | 149μs | 223ns | 866ns | 0.677 | 0.226 | 0 | 4.46 KB |
| #5785 | EnrichedLog |
net6.0 | 114μs | 107ns | 415ns | 0.0569 | 0 | 0 | 4.28 KB |
| #5785 | EnrichedLog |
netcoreapp3.1 | 121μs | 204ns | 788ns | 0.06 | 0 | 0 | 4.28 KB |
| #5785 | EnrichedLog |
net472 | 147μs | 194ns | 751ns | 0.66 | 0.22 | 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.18μs | 1.21ns | 4.69ns | 0.0302 | 0 | 0 | 2.2 KB |
| master | EnrichedLog |
netcoreapp3.1 | 4.11μs | 1.88ns | 7.27ns | 0.0296 | 0 | 0 | 2.2 KB |
| master | EnrichedLog |
net472 | 4.98μs | 1.39ns | 5.4ns | 0.319 | 0 | 0 | 2.02 KB |
| #5785 | EnrichedLog |
net6.0 | 2.93μs | 3.91ns | 14.1ns | 0.0309 | 0 | 0 | 2.2 KB |
| #5785 | EnrichedLog |
netcoreapp3.1 | 3.9μs | 1.22ns | 4.56ns | 0.0292 | 0 | 0 | 2.2 KB |
| #5785 | EnrichedLog |
net472 | 4.95μs | 1.09ns | 4.08ns | 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.27μs | 0.478ns | 1.79ns | 0.0164 | 0 | 0 | 1.14 KB |
| master | SendReceive |
netcoreapp3.1 | 1.73μs | 0.663ns | 2.48ns | 0.0156 | 0 | 0 | 1.14 KB |
| master | SendReceive |
net472 | 2.11μs | 1.39ns | 5.22ns | 0.183 | 0 | 0 | 1.16 KB |
| #5785 | SendReceive |
net6.0 | 1.26μs | 0.717ns | 2.68ns | 0.0158 | 0 | 0 | 1.14 KB |
| #5785 | SendReceive |
netcoreapp3.1 | 1.72μs | 0.705ns | 2.73ns | 0.0154 | 0 | 0 | 1.14 KB |
| #5785 | SendReceive |
net472 | 2.1μs | 1.36ns | 5.28ns | 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.7μs | 0.658ns | 2.28ns | 0.0217 | 0 | 0 | 1.6 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.78μs | 0.902ns | 3.49ns | 0.0208 | 0 | 0 | 1.65 KB |
| master | EnrichedLog |
net472 | 4.27μs | 2.28ns | 8.54ns | 0.323 | 0 | 0 | 2.04 KB |
| #5785 | EnrichedLog |
net6.0 | 2.74μs | 1.2ns | 4.64ns | 0.0232 | 0 | 0 | 1.6 KB |
| #5785 | EnrichedLog |
netcoreapp3.1 | 3.86μs | 1.15ns | 4.31ns | 0.0213 | 0 | 0 | 1.65 KB |
| #5785 | EnrichedLog |
net472 | 4.3μs | 2.54ns | 9.84ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower :warning: Same allocations :heavy_check_mark:
Slower :warning: in #5785
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.214
547.69
664.62
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 393ns | 0.0869ns | 0.325ns | 0.00799 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 548ns | 0.131ns | 0.472ns | 0.00775 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 713ns | 0.868ns | 3.36ns | 0.0915 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 478ns | 0.119ns | 0.462ns | 0.00982 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 698ns | 0.676ns | 2.44ns | 0.00963 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 875ns | 0.381ns | 1.48ns | 0.104 | 0 | 0 | 658 B |
| #5785 | StartFinishSpan |
net6.0 | 397ns | 0.0946ns | 0.354ns | 0.00803 | 0 | 0 | 576 B |
| #5785 | StartFinishSpan |
netcoreapp3.1 | 664ns | 1.01ns | 3.93ns | 0.008 | 0 | 0 | 576 B |
| #5785 | StartFinishSpan |
net472 | 641ns | 0.252ns | 0.975ns | 0.0917 | 0 | 0 | 578 B |
| #5785 | StartFinishScope |
net6.0 | 479ns | 0.161ns | 0.622ns | 0.00984 | 0 | 0 | 696 B |
| #5785 | StartFinishScope |
netcoreapp3.1 | 745ns | 0.286ns | 1.11ns | 0.00929 | 0 | 0 | 696 B |
| #5785 | StartFinishScope |
net472 | 898ns | 0.481ns | 1.86ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower :warning: Same allocations :heavy_check_mark:
Slower :warning: in #5785
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
1.119
864.80
968.12
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 652ns | 0.244ns | 0.945ns | 0.0098 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 864ns | 0.517ns | 1.93ns | 0.00924 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.06μs | 0.552ns | 2.14ns | 0.104 | 0 | 0 | 658 B |
| #5785 | RunOnMethodBegin |
net6.0 | 655ns | 0.454ns | 1.76ns | 0.00979 | 0 | 0 | 696 B |
| #5785 | RunOnMethodBegin |
netcoreapp3.1 | 968ns | 0.257ns | 0.997ns | 0.00926 | 0 | 0 | 696 B |
| #5785 | RunOnMethodBegin |
net472 | 1.07μs | 0.762ns | 2.95ns | 0.104 | 0 | 0 | 658 B |
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 (5785) (11.604M) : 0, 11603911
master (11.565M) : 0, 11564972
benchmarks/2.9.0 (11.530M) : 0, 11530110
section Automatic
This PR (5785) (7.806M) : 0, 7805599
master (7.786M) : 0, 7786143
benchmarks/2.9.0 (8.205M) : 0, 8204760
section Trace stats
master (8.122M) : 0, 8121929
section Manual
This PR (5785) (9.829M) : 0, 9828760
master (9.839M) : 0, 9838575
section Manual + Automatic
This PR (5785) (7.300M) : 0, 7299767
master (7.385M) : 0, 7384651
section Version Conflict
master (6.551M) : 0, 6550532
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5785) (9.369M) : 0, 9369325
master (9.828M) : 0, 9827944
section Automatic
This PR (5785) (6.626M) : 0, 6625581
master (6.627M) : 0, 6626617
section Trace stats
master (6.860M) : 0, 6860409
section Manual
This PR (5785) (8.311M) : 0, 8310804
master (8.260M) : 0, 8260372
section Manual + Automatic
This PR (5785) (6.265M) : 0, 6264988
master (6.131M) : 0, 6131058
section Version Conflict
master (5.603M) : 0, 5603280
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5785) (10.104M) : 0, 10104492
benchmarks/2.9.0 (10.176M) : 0, 10176148
section Automatic
This PR (5785) (7.031M) : 0, 7031062
benchmarks/2.9.0 (7.354M) : 0, 7353635
section Manual
This PR (5785) (8.804M) : 0, 8804212
section Manual + Automatic
This PR (5785) (6.874M) : 0, 6873869
Superseded by https://github.com/DataDog/dd-trace-dotnet/pull/6252 and https://github.com/DataDog/dd-trace-dotnet/pull/6241