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

[Profiler] Use C++20 to make the code more readable

Open gleocadie opened this issue 2 years ago • 3 comments

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

gleocadie avatar Nov 28 '23 15:11 gleocadie

Datadog Report

Branch report: gleocadie/use-cpp20-features Commit report: 8f764bb

:white_check_mark: dd-trace-dotnet: 0 Failed, 0 New Flaky, 301981 Passed, 1026 Skipped, 30m 3.05s Wall Time

datadog-ddstaging[bot] avatar Nov 28 '23 15:11 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 (4935) - mean (72ms)  : 64, 81
     .   : milestone, 72,
    master - mean (70ms)  : 62, 79
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (4935) - mean (995ms)  : 972, 1019
     .   : milestone, 995,
    master - mean (996ms)  : 974, 1017
     .   : milestone, 996,

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

    section CallTarget+Inlining+NGEN
    This PR (4935) - mean (691ms)  : 678, 703
     .   : milestone, 691,
    master - mean (691ms)  : 674, 708
     .   : milestone, 691,

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

    section CallTarget+Inlining+NGEN
    This PR (4935) - mean (665ms)  : 644, 685
     .   : milestone, 665,
    master - mean (657ms)  : 637, 676
     .   : milestone, 657,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4935) - mean (189ms)  : 186, 192
     .   : milestone, 189,
    master - mean (189ms)  : 185, 193
     .   : milestone, 189,

    section CallTarget+Inlining+NGEN
    This PR (4935) - mean (1,139ms)  : 1118, 1159
     .   : milestone, 1139,
    master - mean (1,137ms)  : 1114, 1159
     .   : milestone, 1137,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4935) - mean (273ms)  : 268, 277
     .   : milestone, 273,
    master - mean (271ms)  : 269, 274
     .   : milestone, 271,

    section CallTarget+Inlining+NGEN
    This PR (4935) - mean (1,093ms)  : 1069, 1117
     .   : milestone, 1093,
    master - mean (1,093ms)  : 1069, 1116
     .   : milestone, 1093,

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

    section CallTarget+Inlining+NGEN
    This PR (4935) - mean (1,058ms)  : 1035, 1081
     .   : milestone, 1058,
    master - mean (1,059ms)  : 1037, 1080
     .   : milestone, 1059,

andrewlock avatar Nov 28 '23 15:11 andrewlock

Benchmarks Report :snail:

Benchmarks for #4935 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.120
  • 3 benchmarks are slower, with geometric mean 1.181
  • 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.69μs 48ns 304ns 0.0301 0.0129 0 7.48 KB
master StartStopWithChild netcoreapp3.1 10.6μs 59.3ns 366ns 0.0213 0.0106 0 7.58 KB
master StartStopWithChild net472 16.8μs 49.1ns 190ns 1.34 0.353 0.109 7.94 KB
#4935 StartStopWithChild net6.0 8.74μs 43.9ns 206ns 0.0222 0.00888 0 7.48 KB
#4935 StartStopWithChild netcoreapp3.1 10.9μs 59.6ns 367ns 0.0323 0.0162 0 7.58 KB
#4935 StartStopWithChild net472 16.9μs 57.6ns 223ns 1.34 0.35 0.103 7.94 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 141ns 527ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 651μs 1.33μs 5.13μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 783μs 206ns 796ns 0.393 0 0 3.3 KB
#4935 WriteAndFlushEnrichedTraces net6.0 473μs 333ns 1.29μs 0 0 0 2.7 KB
#4935 WriteAndFlushEnrichedTraces netcoreapp3.1 629μs 556ns 2.08μs 0 0 0 2.7 KB
#4935 WriteAndFlushEnrichedTraces net472 773μs 301ns 1.17μs 0.388 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #4935

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑netcoreapp3.1 1.250 187.23 234.11

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 44.3μs 43.4ns 168ns 0.0222 0 0 1.77 KB
master AllCycleSimpleBody netcoreapp3.1 46.8μs 89.3ns 346ns 0 0 0 1.74 KB
master AllCycleSimpleBody net472 50.5μs 12.5ns 46.6ns 0.271 0 0 1.81 KB
master AllCycleMoreComplexBody net6.0 212μs 77.7ns 291ns 0.116 0 0 9.25 KB
master AllCycleMoreComplexBody netcoreapp3.1 224μs 134ns 517ns 0.112 0 0 9.14 KB
master AllCycleMoreComplexBody net472 237μs 70.6ns 273ns 1.42 0 0 9.32 KB
master ObjectExtractorSimpleBody net6.0 130ns 0.0506ns 0.183ns 0.00394 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 187ns 0.0623ns 0.233ns 0.00377 0 0 272 B
master ObjectExtractorSimpleBody net472 152ns 0.0727ns 0.272ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 2.79μs 0.882ns 3.18ns 0.0534 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.65μs 3.93ns 15.2ns 0.0504 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.51μs 1.4ns 5.43ns 0.602 0.00526 0 3.8 KB
#4935 AllCycleSimpleBody net6.0 44μs 27.2ns 105ns 0.0221 0 0 1.77 KB
#4935 AllCycleSimpleBody netcoreapp3.1 46.9μs 54.7ns 212ns 0.0232 0 0 1.74 KB
#4935 AllCycleSimpleBody net472 48.7μs 44.5ns 154ns 0.272 0 0 1.81 KB
#4935 AllCycleMoreComplexBody net6.0 212μs 52.1ns 202ns 0.106 0 0 9.25 KB
#4935 AllCycleMoreComplexBody netcoreapp3.1 224μs 361ns 1.4μs 0.112 0 0 9.14 KB
#4935 AllCycleMoreComplexBody net472 241μs 40.6ns 146ns 1.42 0 0 9.32 KB
#4935 ObjectExtractorSimpleBody net6.0 134ns 0.0494ns 0.191ns 0.00395 0 0 280 B
#4935 ObjectExtractorSimpleBody netcoreapp3.1 234ns 0.28ns 1.09ns 0.00376 0 0 272 B
#4935 ObjectExtractorSimpleBody net472 151ns 0.104ns 0.404ns 0.0446 0 0 281 B
#4935 ObjectExtractorMoreComplexBody net6.0 2.77μs 1.14ns 4.25ns 0.0527 0 0 3.78 KB
#4935 ObjectExtractorMoreComplexBody netcoreapp3.1 3.68μs 1.33ns 5.14ns 0.0496 0 0 3.69 KB
#4935 ObjectExtractorMoreComplexBody net472 3.51μs 2.58ns 10ns 0.603 0.00529 0 3.8 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 RunWaf(args=NestedMap (10)) net6.0 52.6μs 304ns 2.49μs 0.208 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) netcoreapp3.1 69.2μs 369ns 2.02μs 0.212 0 0 16.06 KB
master RunWaf(args=NestedMap (10)) net472 96.1μs 511ns 2.61μs 2.54 0.0977 0 16.14 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 115μs 362ns 1.25μs 0.3 0 0 22.41 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 141μs 660ns 2.47μs 0.245 0 0 22.36 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 164μs 84.7ns 328ns 3.53 0.164 0 22.7 KB
master RunWaf(args=NestedMap (100)) net6.0 96.6μs 20.3ns 73.2ns 0.431 0 0 32.76 KB
master RunWaf(args=NestedMap (100)) netcoreapp3.1 127μs 616ns 2.54μs 0.443 0 0 33.33 KB
master RunWaf(args=NestedMap (100)) net472 186μs 883ns 3.53μs 5.28 0.364 0 33.67 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 167μs 106ns 412ns 0.52 0 0 39.1 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 211μs 803ns 3.5μs 0.519 0 0 39.63 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net472 267μs 571ns 2.14μs 6.39 0.522 0 40.23 KB
master RunWaf(args=NestedMap (20)) net6.0 94.3μs 32ns 124ns 0.427 0 0 32.18 KB
master RunWaf(args=NestedMap (20)) netcoreapp3.1 131μs 527ns 1.9μs 0.443 0 0 32.3 KB
master RunWaf(args=NestedMap (20)) net472 189μs 53.4ns 207ns 5.16 0.362 0 32.63 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 171μs 111ns 429ns 0.509 0 0 38.53 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 211μs 377ns 1.46μs 0.506 0 0 38.6 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 259μs 102ns 369ns 6.17 0.514 0 39.2 KB
#4935 RunWaf(args=NestedMap (10)) net6.0 49μs 36ns 130ns 0.22 0 0 16.06 KB
#4935 RunWaf(args=NestedMap (10)) netcoreapp3.1 69.4μs 379ns 2.15μs 0.214 0 0 16.06 KB
#4935 RunWaf(args=NestedMap (10)) net472 93.5μs 61.2ns 237ns 2.53 0.0937 0 16.14 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 118μs 444ns 1.72μs 0.298 0 0 22.41 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 138μs 710ns 3.17μs 0.281 0 0 22.36 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [22]) net472 167μs 168ns 652ns 3.55 0.169 0 22.7 KB
#4935 RunWaf(args=NestedMap (100)) net6.0 95.1μs 40.1ns 188ns 0.475 0 0 32.76 KB
#4935 RunWaf(args=NestedMap (100)) netcoreapp3.1 133μs 731ns 4.57μs 0.409 0 0 33.33 KB
#4935 RunWaf(args=NestedMap (100)) net472 192μs 68.1ns 264ns 5.34 0.368 0 33.67 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 171μs 156ns 603ns 0.515 0 0 39.1 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 203μs 858ns 3.32μs 0.517 0 0 39.63 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [23]) net472 265μs 413ns 1.6μs 6.39 0.522 0 40.23 KB
#4935 RunWaf(args=NestedMap (20)) net6.0 102μs 529ns 2.59μs 0.446 0 0 32.18 KB
#4935 RunWaf(args=NestedMap (20)) netcoreapp3.1 132μs 718ns 4.06μs 0.404 0 0 32.3 KB
#4935 RunWaf(args=NestedMap (20)) net472 181μs 90.3ns 350ns 5.13 0.36 0 32.63 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 167μs 78.3ns 303ns 0.515 0 0 38.53 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 204μs 1μs 4.13μs 0.5 0 0 38.6 KB
#4935 RunWafWithAttack(args=Neste(...)tack) [22]) net472 259μs 270ns 1.05μs 6.19 0.515 0 39.2 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 172μs 68.6ns 266ns 0.172 0 0 18.24 KB
master SendRequest netcoreapp3.1 193μs 200ns 775ns 0.192 0 0 20.4 KB
master SendRequest net472 4.02E‑06ns 4.02E‑06ns 1.56E‑05ns 0 0 0 0 b
#4935 SendRequest net6.0 173μs 206ns 796ns 0.173 0 0 18.24 KB
#4935 SendRequest netcoreapp3.1 192μs 371ns 1.44μs 0.191 0 0 20.4 KB
#4935 SendRequest net472 0.000209ns 0.00011ns 0.000396ns 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 557μs 1.48μs 5.75μs 0.561 0 0 41.62 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 746ns 2.89μs 0.332 0 0 41.65 KB
master WriteAndFlushEnrichedTraces net472 854μs 3.41μs 13.2μs 8.33 2.5 0.417 53.23 KB
#4935 WriteAndFlushEnrichedTraces net6.0 541μs 995ns 3.86μs 0.53 0 0 41.55 KB
#4935 WriteAndFlushEnrichedTraces netcoreapp3.1 660μs 499ns 1.8μs 0.334 0 0 41.69 KB
#4935 WriteAndFlushEnrichedTraces net472 822μs 3.85μs 15.9μs 8.12 2.44 0.406 53.26 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.09μs 0.504ns 1.95ns 0.0109 0 0 768 B
master ExecuteNonQuery netcoreapp3.1 1.45μs 2.6ns 10.1ns 0.0101 0 0 768 B
master ExecuteNonQuery net472 1.73μs 0.933ns 3.61ns 0.115 0 0 730 B
#4935 ExecuteNonQuery net6.0 1.1μs 0.752ns 2.91ns 0.011 0 0 768 B
#4935 ExecuteNonQuery netcoreapp3.1 1.53μs 1.71ns 6.64ns 0.0105 0 0 768 B
#4935 ExecuteNonQuery net472 1.75μs 3.78ns 14.7ns 0.116 0.000869 0 730 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #4935

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.147 1,130.86 1,297.34

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.13μs 0.479ns 1.79ns 0.0127 0 0 936 B
master CallElasticsearch netcoreapp3.1 1.41μs 0.947ns 3.67ns 0.0128 0 0 936 B
master CallElasticsearch net472 2.39μs 0.872ns 3.38ns 0.151 0 0 955 B
master CallElasticsearchAsync net6.0 1.35μs 0.632ns 2.45ns 0.0129 0 0 912 B
master CallElasticsearchAsync netcoreapp3.1 1.54μs 0.751ns 2.91ns 0.013 0 0 984 B
master CallElasticsearchAsync net472 2.61μs 0.872ns 3.26ns 0.16 0 0 1.01 KB
#4935 CallElasticsearch net6.0 1.3μs 0.777ns 2.91ns 0.013 0 0 936 B
#4935 CallElasticsearch netcoreapp3.1 1.51μs 0.899ns 3.24ns 0.0128 0 0 936 B
#4935 CallElasticsearch net472 2.51μs 1.02ns 3.96ns 0.151 0.00123 0 955 B
#4935 CallElasticsearchAsync net6.0 1.24μs 1.25ns 4.84ns 0.0125 0 0 912 B
#4935 CallElasticsearchAsync netcoreapp3.1 1.58μs 3.7ns 14.3ns 0.0135 0 0 984 B
#4935 CallElasticsearchAsync net472 2.67μs 1ns 3.88ns 0.16 0 0 1.01 KB
Benchmarks.Trace.GraphQLBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #4935

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 1.148 1,207.05 1,386.07

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.21μs 0.985ns 3.81ns 0.0127 0 0 912 B
master ExecuteAsync netcoreapp3.1 1.59μs 0.93ns 3.48ns 0.012 0 0 912 B
master ExecuteAsync net472 1.83μs 8.96ns 44.8ns 0.139 0 0 875 B
#4935 ExecuteAsync net6.0 1.39μs 2.34ns 8.44ns 0.0126 0 0 912 B
#4935 ExecuteAsync netcoreapp3.1 1.61μs 0.814ns 3.05ns 0.0121 0 0 912 B
#4935 ExecuteAsync net472 1.79μs 1.05ns 4.05ns 0.139 0 0 875 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.19μs 1.69ns 6.56ns 0.0292 0 0 2.1 KB
master SendAsync netcoreapp3.1 5μs 2.65ns 10.3ns 0.0353 0 0 2.63 KB
master SendAsync net472 7.9μs 2.02ns 7.83ns 0.523 0 0 3.31 KB
#4935 SendAsync net6.0 4.15μs 1.16ns 4.33ns 0.029 0 0 2.1 KB
#4935 SendAsync netcoreapp3.1 4.99μs 7.77ns 30.1ns 0.0344 0 0 2.63 KB
#4935 SendAsync net472 7.81μs 3.91ns 14.6ns 0.524 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - 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 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 63.1μs 933ns 9.24μs 0 0 0 43.44 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 53.6μs 202ns 729ns 0 0 0 42.64 KB
master StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 38.1μs 74.6ns 269ns 0 0 0 59.88 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 89.6μs 2.7μs 27μs 0 0 0 43.29 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 105μs 3.61μs 35.7μs 0 0 0 42.64 KB
master StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 65.3μs 348ns 1.81μs 0 0 0 57.34 KB
#4935 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net6.0 64.8μs 867ns 8.59μs 0 0 0 43.44 KB
#4935 StringConcatBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 53.1μs 104ns 375ns 0 0 0 42.64 KB
#4935 StringConcatBenchmark(parameters=Syste(...)ring] [48]) net472 38.2μs 91.4ns 330ns 0 0 0 59.88 KB
#4935 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net6.0 96μs 3.12μs 31.2μs 0 0 0 43.29 KB
#4935 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) netcoreapp3.1 97.5μs 3.91μs 38.9μs 0 0 0 42.64 KB
#4935 StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) net472 61.9μs 237ns 916ns 0 0 0 57.34 KB
Benchmarks.Trace.ILoggerBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #4935

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.121 1,672.01 1,490.94

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.67μs 0.838ns 3.14ns 0.0223 0 0 1.57 KB
master EnrichedLog netcoreapp3.1 2.19μs 0.987ns 3.56ns 0.0207 0 0 1.57 KB
master EnrichedLog net472 2.77μs 1.27ns 4.59ns 0.238 0 0 1.5 KB
#4935 EnrichedLog net6.0 1.49μs 0.68ns 2.54ns 0.0217 0 0 1.57 KB
#4935 EnrichedLog netcoreapp3.1 2.29μs 1.09ns 4.21ns 0.0213 0 0 1.57 KB
#4935 EnrichedLog net472 2.55μs 2.02ns 7.82ns 0.238 0 0 1.5 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 114μs 188ns 729ns 0.0564 0 0 4.21 KB
master EnrichedLog netcoreapp3.1 119μs 159ns 616ns 0 0 0 4.21 KB
master EnrichedLog net472 148μs 111ns 431ns 0.665 0.222 0 4.39 KB
#4935 EnrichedLog net6.0 113μs 96ns 372ns 0.0564 0 0 4.21 KB
#4935 EnrichedLog netcoreapp3.1 120μs 171ns 641ns 0 0 0 4.21 KB
#4935 EnrichedLog net472 150μs 143ns 553ns 0.67 0.223 0 4.39 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.781ns 3.03ns 0.0299 0 0 2.13 KB
master EnrichedLog netcoreapp3.1 4.05μs 1.21ns 4.51ns 0.0284 0 0 2.13 KB
master EnrichedLog net472 4.77μs 3.38ns 13.1ns 0.309 0 0 1.95 KB
#4935 EnrichedLog net6.0 2.92μs 0.72ns 2.59ns 0.0293 0 0 2.13 KB
#4935 EnrichedLog netcoreapp3.1 4.25μs 1.02ns 3.81ns 0.0276 0 0 2.13 KB
#4935 EnrichedLog net472 4.96μs 6.79ns 26.3ns 0.307 0 0 1.95 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.28μs 0.642ns 2.4ns 0.0152 0 0 1.1 KB
master SendReceive netcoreapp3.1 1.7μs 0.895ns 3.35ns 0.015 0 0 1.1 KB
master SendReceive net472 2.03μs 0.946ns 3.66ns 0.177 0 0 1.12 KB
#4935 SendReceive net6.0 1.27μs 0.894ns 3.46ns 0.0158 0 0 1.1 KB
#4935 SendReceive netcoreapp3.1 1.75μs 0.588ns 2.28ns 0.0149 0 0 1.1 KB
#4935 SendReceive net472 2.17μs 0.962ns 3.6ns 0.177 0 0 1.12 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.89μs 0.56ns 2.17ns 0.0216 0 0 1.53 KB
master EnrichedLog netcoreapp3.1 3.88μs 1.63ns 6.33ns 0.0214 0 0 1.58 KB
master EnrichedLog net472 4.24μs 2.1ns 8.15ns 0.311 0 0 1.97 KB
#4935 EnrichedLog net6.0 2.86μs 0.995ns 3.59ns 0.0214 0 0 1.53 KB
#4935 EnrichedLog netcoreapp3.1 3.99μs 5ns 19.4ns 0.0219 0 0 1.58 KB
#4935 EnrichedLog net472 4.23μs 3.88ns 15ns 0.312 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #4935

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

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 504ns 0.109ns 0.392ns 0.00754 0 0 536 B
master StartFinishSpan netcoreapp3.1 660ns 0.506ns 1.96ns 0.00715 0 0 536 B
master StartFinishSpan net472 842ns 0.174ns 0.649ns 0.0852 0 0 538 B
master StartFinishScope net6.0 552ns 0.138ns 0.535ns 0.00928 0 0 656 B
master StartFinishScope netcoreapp3.1 864ns 1.21ns 4.69ns 0.00864 0 0 656 B
master StartFinishScope net472 988ns 0.545ns 2.11ns 0.0982 0 0 618 B
#4935 StartFinishSpan net6.0 451ns 0.175ns 0.676ns 0.00747 0 0 536 B
#4935 StartFinishSpan netcoreapp3.1 664ns 1.47ns 5.7ns 0.00719 0 0 536 B
#4935 StartFinishSpan net472 774ns 0.254ns 0.984ns 0.0851 0 0 538 B
#4935 StartFinishScope net6.0 600ns 0.156ns 0.606ns 0.0093 0 0 656 B
#4935 StartFinishScope netcoreapp3.1 795ns 0.525ns 2.03ns 0.00868 0 0 656 B
#4935 StartFinishScope net472 977ns 0.749ns 2.9ns 0.0981 0 0 618 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 765ns 0.171ns 0.641ns 0.00919 0 0 656 B
master RunOnMethodBegin netcoreapp3.1 944ns 0.327ns 1.22ns 0.00866 0 0 656 B
master RunOnMethodBegin net472 1.15μs 0.411ns 1.59ns 0.0981 0 0 618 B
#4935 RunOnMethodBegin net6.0 752ns 0.165ns 0.618ns 0.009 0 0 656 B
#4935 RunOnMethodBegin netcoreapp3.1 936ns 4.31ns 16.7ns 0.0091 0 0 656 B
#4935 RunOnMethodBegin net472 1.08μs 0.743ns 2.88ns 0.0979 0 0 618 B

andrewlock avatar Nov 28 '23 17:11 andrewlock