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

[Profiler] Use custom allocator for callstack

Open gleocadie opened this issue 1 year ago • 3 comments

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

gleocadie avatar Feb 29 '24 15:02 gleocadie

Datadog Report

Branch report: gleocadie/cutsom-allocator Commit report: 3eef317 Test service: dd-trace-dotnet

:x: 2 Failed (1 Known Flaky), 337969 Passed, 1602 Skipped, 41m 52.24s Wall Time

:x: Failed Tests (2)

  • CheckCpuTimeForGcThreadsIsReported - Datadog.Profiler.IntegrationTests.GarbageCollections.GarbageCollectorCpuTimeTest - :snowflake: Known flaky - Details

    Expand for error
    xpected SamplesHelper.GetSamples(runner.Environment.PprofDir) {(|lm: |ns: |ct: |cg: |fn:Garbage Collector |fg: |sg:
    lm: |ns: |ct: |cg: |fn:gen0 |fg: |sg:, Perftools.Profiles.Label[], System.Int64[]), (|lm: |ns: |ct: |cg: |fn:Garbage Collector |fg: |sg:
    lm: |ns: |ct: |cg: |fn:gen0 |fg: |sg:, Perftools.Profiles.Label[], System.Int64[]), (|lm: |ns: |ct: |cg: |fn:Garbage Collector |fg: |sg:
    lm: |ns: |ct: |cg: |fn:gen0 |fg: |sg:, Perftools.Profiles.Label[], System.Int64[]), (|lm:System.Private.CoreLib |ns:System.Text.Unicode |ct:Utf8Utility |cg: |fn:TranscodeToUtf8 |fg: |sg:(char* pInputBuffer, int inputLength, byte* pOutputBuffer, int outputBytesRemaining, char*& pInputBufferRemaining, byte*& pOutputBufferRemaining)
    lm:System.Private.CoreLib |ns:System.Text |ct:UTF8Encoding |cg: |fn:GetBytes |fg: |sg:(char* chars, int charCount, byte* bytes, int byteCount)
    lm:System.Private.CoreLib |ns:System |ct:RuntimeType.RuntimeTypeCache.MemberInfoCache |cg:<T> |fn:GetListByName |fg: |sg:(char* pName, int cNameLen, byte* pUtf8Name, int cUtf8Name, MemberListType listType, CacheType cacheType)
    lm:System.Private.CoreLib |ns:System |ct:RuntimeType.RuntimeTypeCache.MemberInfoCache |cg:<T> |fn:Populate |fg: |sg:(string name, MemberListType listType, CacheType cacheType)
    lm:System.Private.CoreLib |ns:System |ct:RuntimeType.RuntimeTypeCache.MemberInfoCache |cg:<T> |fn:GetMemberList |fg: |sg:(MemberListType listType, string name, CacheType cacheType)
    lm:System.Private.CoreLib |ns:System |ct:RuntimeType |cg: |fn:GetPropertyCandidates |fg: |sg:(string name, System.Reflection.BindingFlags bindingAttr, System.Type[] types, bool allowPrefixLookup)
    lm:System.Private.CoreLib |ns:System |ct:RuntimeType |cg: |fn:GetPropertyImpl |fg: |sg:(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers)
    ..
    
  • FaultyApi - Datadog.Trace.Tests.Agent.AgentWriterTests - Details

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

datadog-ddstaging[bot] avatar Feb 29 '24 20:02 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 (5252) - mean (74ms)  : 64, 83
     .   : milestone, 74,
    master - mean (73ms)  : 65, 81
     .   : milestone, 73,

    section CallTarget+Inlining+NGEN
    This PR (5252) - mean (985ms)  : 962, 1007
     .   : milestone, 985,
    master - mean (992ms)  : 968, 1015
     .   : milestone, 992,

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

    section CallTarget+Inlining+NGEN
    This PR (5252) - mean (715ms)  : 685, 745
     .   : milestone, 715,
    master - mean (716ms)  : 689, 744
     .   : milestone, 716,

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

    section CallTarget+Inlining+NGEN
    This PR (5252) - mean (671ms)  : 640, 703
     .   : milestone, 671,
    master - mean (670ms)  : 638, 702
     .   : milestone, 670,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5252) - mean (188ms)  : 183, 192
     .   : milestone, 188,
    master - mean (187ms)  : 184, 190
     .   : milestone, 187,

    section CallTarget+Inlining+NGEN
    This PR (5252) - mean (1,055ms)  : 1022, 1087
     .   : milestone, 1055,
    master - mean (1,059ms)  : 1029, 1089
     .   : milestone, 1059,

gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5252) - mean (270ms)  : 266, 275
     .   : milestone, 270,
    master - mean (269ms)  : 264, 274
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (5252) - mean (863ms)  : 836, 891
     .   : milestone, 863,
    master - mean (869ms)  : 841, 896
     .   : milestone, 869,

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

    section CallTarget+Inlining+NGEN
    This PR (5252) - mean (855ms)  : 834, 877
     .   : milestone, 855,
    master - mean (847ms)  : 825, 869
     .   : milestone, 847,

andrewlock avatar Feb 29 '24 20:02 andrewlock

Benchmarks Report :snail:

Benchmarks for #5252 compared to master:

  • 11 benchmarks are faster, with geometric mean 1.283
  • 3 benchmarks are slower, with geometric mean 1.374
  • 7 benchmarks have fewer allocations
  • 4 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.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 49.3ns 338ns 0.0219 0.00874 0 7.49 KB
master StartStopWithChild netcoreapp3.1 10.6μs 57.9ns 332ns 0.0367 0.0157 0 7.59 KB
master StartStopWithChild net472 17.1μs 65.4ns 253ns 1.33 0.338 0.11 7.95 KB
#5252 StartStopWithChild net6.0 8.81μs 48.7ns 292ns 0.021 0.0084 0 7.49 KB
#5252 StartStopWithChild netcoreapp3.1 10.9μs 59.7ns 348ns 0.0322 0.0161 0 7.58 KB
#5252 StartStopWithChild net472 16.8μs 41.8ns 162ns 1.33 0.349 0.116 7.96 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 457μs 196ns 732ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 624μs 332ns 1.29μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 803μs 236ns 914ns 0.401 0 0 3.3 KB
#5252 WriteAndFlushEnrichedTraces net6.0 466μs 230ns 862ns 0 0 0 2.7 KB
#5252 WriteAndFlushEnrichedTraces netcoreapp3.1 633μs 246ns 920ns 0 0 0 2.7 KB
#5252 WriteAndFlushEnrichedTraces net472 810μs 222ns 861ns 0.403 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #5252

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody‑net6.0 1.234 3,020.33 3,727.82

Faster :tada: in #5252

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 1.413 66,382.20 46,981.83

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 41.6μs 76ns 294ns 0.0206 0 0 2.36 KB
master AllCycleSimpleBody netcoreapp3.1 43.5μs 87.3ns 302ns 0.0218 0 0 2.34 KB
master AllCycleSimpleBody net472 66.4μs 15.5ns 59.9ns 0.366 0 0 2.41 KB
master AllCycleMoreComplexBody net6.0 216μs 240ns 930ns 0.109 0 0 9.84 KB
master AllCycleMoreComplexBody netcoreapp3.1 227μs 208ns 807ns 0.113 0 0 9.73 KB
master AllCycleMoreComplexBody net472 241μs 122ns 472ns 1.56 0 0 9.91 KB
master ObjectExtractorSimpleBody net6.0 139ns 0.0984ns 0.368ns 0.00391 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 208ns 0.104ns 0.403ns 0.00377 0 0 272 B
master ObjectExtractorSimpleBody net472 171ns 0.0727ns 0.281ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.02μs 1.31ns 5.09ns 0.0528 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.03μs 2.02ns 7.82ns 0.0504 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.82μs 2.49ns 8.99ns 0.602 0.00573 0 3.8 KB
#5252 AllCycleSimpleBody net6.0 40.9μs 40.3ns 156ns 0.0205 0 0 2.36 KB
#5252 AllCycleSimpleBody netcoreapp3.1 44.2μs 74.2ns 287ns 0.0219 0 0 2.34 KB
#5252 AllCycleSimpleBody net472 47μs 26.9ns 104ns 0.375 0 0 2.41 KB
#5252 AllCycleMoreComplexBody net6.0 215μs 96.5ns 374ns 0.107 0 0 9.84 KB
#5252 AllCycleMoreComplexBody netcoreapp3.1 226μs 246ns 952ns 0.113 0 0 9.73 KB
#5252 AllCycleMoreComplexBody net472 238μs 79ns 306ns 1.55 0 0 9.91 KB
#5252 ObjectExtractorSimpleBody net6.0 140ns 0.062ns 0.24ns 0.00391 0 0 280 B
#5252 ObjectExtractorSimpleBody netcoreapp3.1 197ns 0.107ns 0.387ns 0.00371 0 0 272 B
#5252 ObjectExtractorSimpleBody net472 173ns 0.104ns 0.403ns 0.0446 0 0 281 B
#5252 ObjectExtractorMoreComplexBody net6.0 3.73μs 1.55ns 5.81ns 0.0522 0 0 3.78 KB
#5252 ObjectExtractorMoreComplexBody netcoreapp3.1 4.07μs 1.88ns 7.02ns 0.0492 0 0 3.69 KB
#5252 ObjectExtractorMoreComplexBody net472 3.8μs 3.33ns 12.9ns 0.603 0.00569 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Faster :tada: Fewer allocations :tada:

Faster :tada: in #5252

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net6.0 1.567 50,778.73 32,405.25
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑netcoreapp3.1 1.506 68,649.93 45,588.21
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net472 1.410 84,737.49 60,105.16
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0 1.292 128,119.13 99,158.93
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑netcoreapp3.1 1.203 155,396.38 129,135.07
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 1.199 217,433.91 181,358.07

Fewer allocations :tada: in #5252

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net6.0 30.94 KB 27.94 KB -3 KB -9.69%
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0 33.89 KB 30.34 KB -3.55 KB -10.47%
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑netcoreapp3.1 34.09 KB 30.34 KB -3.74 KB -10.98%
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑netcoreapp3.1 31.47 KB 27.94 KB -3.53 KB -11.20%
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 34.99 KB 30.44 KB -4.55 KB -13.00%
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net472 32.27 KB 28.03 KB -4.23 KB -13.12%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 50.9μs 51.7ns 200ns 0.426 0 0 30.94 KB
master EncodeArgs netcoreapp3.1 68.7μs 86.4ns 323ns 0.407 0 0 31.47 KB
master EncodeArgs net472 84.8μs 67.7ns 262ns 5.12 0.0846 0 32.27 KB
master EncodeLegacyArgs net6.0 128μs 146ns 547ns 0.443 0 0 33.89 KB
master EncodeLegacyArgs netcoreapp3.1 155μs 374ns 1.45μs 0.468 0 0 34.09 KB
master EncodeLegacyArgs net472 217μs 571ns 2.21μs 5.46 0.42 0 34.99 KB
#5252 EncodeArgs net6.0 32.4μs 22.2ns 83.2ns 0.394 0 0 27.94 KB
#5252 EncodeArgs netcoreapp3.1 45.6μs 31.6ns 122ns 0.384 0 0 27.94 KB
#5252 EncodeArgs net472 60.1μs 52.7ns 204ns 4.43 0.0599 0 28.03 KB
#5252 EncodeLegacyArgs net6.0 99.5μs 426ns 1.59μs 0.397 0.0497 0 30.34 KB
#5252 EncodeLegacyArgs netcoreapp3.1 129μs 181ns 677ns 0.372 0 0 30.34 KB
#5252 EncodeLegacyArgs net472 182μs 292ns 1.13μs 4.81 0.363 0 30.44 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 188μs 46.1ns 172ns 0.0943 0 0 6.51 KB
master RunWafRealisticBenchmark netcoreapp3.1 204μs 184ns 714ns 0 0 0 6.49 KB
master RunWafRealisticBenchmark net472 224μs 125ns 485ns 1 0 0 6.59 KB
master RunWafRealisticBenchmarkWithAttack net6.0 126μs 78.4ns 293ns 0 0 0 4.15 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 148ns 573ns 0 0 0 4.14 KB
master RunWafRealisticBenchmarkWithAttack net472 147μs 50.8ns 190ns 0.657 0 0 4.19 KB
#5252 RunWafRealisticBenchmark net6.0 190μs 114ns 443ns 0.0956 0 0 6.51 KB
#5252 RunWafRealisticBenchmark netcoreapp3.1 202μs 253ns 978ns 0 0 0 6.49 KB
#5252 RunWafRealisticBenchmark net472 224μs 131ns 507ns 1.01 0 0 6.59 KB
#5252 RunWafRealisticBenchmarkWithAttack net6.0 125μs 129ns 498ns 0.062 0 0 4.15 KB
#5252 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 184ns 712ns 0 0 0 4.14 KB
#5252 RunWafRealisticBenchmarkWithAttack net472 148μs 143ns 555ns 0.665 0 0 4.19 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 143ns 554ns 0.171 0 0 18.26 KB
master SendRequest netcoreapp3.1 191μs 198ns 769ns 0.191 0 0 20.42 KB
master SendRequest net472 0.000896ns 0.00028ns 0.00101ns 0 0 0 0 b
#5252 SendRequest net6.0 170μs 189ns 733ns 0.255 0 0 18.26 KB
#5252 SendRequest netcoreapp3.1 193μs 204ns 735ns 0.191 0 0 20.42 KB
#5252 SendRequest net472 0.0016ns 0.000627ns 0.00243ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed :heavy_check_mark: More allocations :warning:

More allocations :warning: in #5252

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.47 KB 41.82 KB 349 B 0.84%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 549μs 2.1μs 8.12μs 0.563 0 0 41.47 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 514ns 1.92μs 0.329 0 0 41.59 KB
master WriteAndFlushEnrichedTraces net472 837μs 3.96μs 16.8μs 8.25 2.6 0.434 53.21 KB
#5252 WriteAndFlushEnrichedTraces net6.0 547μs 300ns 1.16μs 0.546 0 0 41.82 KB
#5252 WriteAndFlushEnrichedTraces netcoreapp3.1 637μs 454ns 1.64μs 0.322 0 0 41.76 KB
#5252 WriteAndFlushEnrichedTraces net472 872μs 3.69μs 14.3μs 8.19 2.59 0.431 53.24 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.02μs 0.816ns 3.16ns 0.0107 0 0 776 B
master ExecuteNonQuery netcoreapp3.1 1.42μs 0.572ns 2.06ns 0.0106 0 0 776 B
master ExecuteNonQuery net472 1.79μs 0.713ns 2.76ns 0.117 0 0 738 B
#5252 ExecuteNonQuery net6.0 1.1μs 0.818ns 3.17ns 0.0109 0 0 776 B
#5252 ExecuteNonQuery netcoreapp3.1 1.52μs 1.4ns 5.44ns 0.00985 0 0 776 B
#5252 ExecuteNonQuery net472 1.68μs 2.54ns 9.52ns 0.117 0 0 738 B
Benchmarks.Trace.ElasticsearchBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #5252

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.140 1,390.38 1,219.92

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.31μs 0.685ns 2.56ns 0.0135 0 0 944 B
master CallElasticsearch netcoreapp3.1 1.52μs 1.07ns 3.99ns 0.0128 0 0 944 B
master CallElasticsearch net472 2.5μs 0.715ns 2.68ns 0.153 0 0 963 B
master CallElasticsearchAsync net6.0 1.39μs 0.628ns 2.43ns 0.0132 0 0 920 B
master CallElasticsearchAsync netcoreapp3.1 1.65μs 0.514ns 1.92ns 0.0132 0 0 992 B
master CallElasticsearchAsync net472 2.56μs 0.691ns 2.68ns 0.161 0 0 1.02 KB
#5252 CallElasticsearch net6.0 1.18μs 0.597ns 2.15ns 0.0131 0 0 944 B
#5252 CallElasticsearch netcoreapp3.1 1.56μs 1.12ns 4.35ns 0.0125 0 0 944 B
#5252 CallElasticsearch net472 2.35μs 1.02ns 3.94ns 0.152 0 0 963 B
#5252 CallElasticsearchAsync net6.0 1.22μs 1.16ns 4.49ns 0.0128 0 0 920 B
#5252 CallElasticsearchAsync netcoreapp3.1 1.59μs 1.2ns 4.32ns 0.0132 0 0 992 B
#5252 CallElasticsearchAsync net472 2.56μs 0.902ns 3.38ns 0.162 0 0 1.02 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.42μs 3.01ns 10.9ns 0.0128 0 0 920 B
master ExecuteAsync netcoreapp3.1 1.69μs 0.868ns 3.36ns 0.0127 0 0 920 B
master ExecuteAsync net472 1.84μs 0.648ns 2.51ns 0.14 0 0 883 B
#5252 ExecuteAsync net6.0 1.32μs 0.799ns 3.09ns 0.0127 0 0 920 B
#5252 ExecuteAsync netcoreapp3.1 1.7μs 0.93ns 3.48ns 0.0127 0 0 920 B
#5252 ExecuteAsync net472 1.8μs 2.6ns 9.74ns 0.14 0 0 883 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.14μs 2.11ns 7.61ns 0.0289 0 0 2.1 KB
master SendAsync netcoreapp3.1 4.99μs 3.29ns 12.8ns 0.0349 0 0 2.64 KB
master SendAsync net472 7.58μs 2.82ns 10.9ns 0.525 0 0 3.31 KB
#5252 SendAsync net6.0 4.06μs 17.6ns 63.3ns 0.0295 0 0 2.1 KB
#5252 SendAsync netcoreapp3.1 5.06μs 2.01ns 7.51ns 0.0353 0 0 2.64 KB
#5252 SendAsync net472 7.66μs 3.85ns 14.4ns 0.527 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower :warning: More allocations :warning:

Slower :warning: in #5252

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 1.870 303,100.00 566,700.00

More allocations :warning: in #5252

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 216.77 KB 276.31 KB 59.54 KB 27.47%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 61.06 KB 61.66 KB 600 B 0.98%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 203.54 KB 205.31 KB 1.78 KB 0.87%

Fewer allocations :tada: in #5252

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 229.38 KB 221.18 KB -8.19 KB -3.57%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 58.8μs 795ns 7.95μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 52.6μs 240ns 930ns 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.3μs 120ns 416ns 0 0 0 61.06 KB
master StringConcatAspectBenchmark net6.0 264μs 1.25μs 7.05μs 0 0 0 203.54 KB
master StringConcatAspectBenchmark netcoreapp3.1 306μs 1.49μs 11.2μs 0 0 0 216.77 KB
master StringConcatAspectBenchmark net472 227μs 1.19μs 6.16μs 0 0 0 229.38 KB
#5252 StringConcatBenchmark net6.0 55.6μs 541ns 5.32μs 0 0 0 43.44 KB
#5252 StringConcatBenchmark netcoreapp3.1 56.7μs 479ns 4.74μs 0 0 0 42.64 KB
#5252 StringConcatBenchmark net472 36.9μs 82.9ns 310ns 0 0 0 61.66 KB
#5252 StringConcatAspectBenchmark net6.0 272μs 1.16μs 4.01μs 0 0 0 205.31 KB
#5252 StringConcatAspectBenchmark netcoreapp3.1 567μs 3.02μs 15.1μs 0 0 0 276.31 KB
#5252 StringConcatAspectBenchmark net472 237μs 976ns 3.38μs 0 0 0 221.18 KB
Benchmarks.Trace.ILoggerBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #5252

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 1.128 2,718.68 2,410.89

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.66μs 0.352ns 1.27ns 0.022 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 2.18μs 0.728ns 2.72ns 0.0209 0 0 1.58 KB
master EnrichedLog net472 2.72μs 1.17ns 4.36ns 0.238 0 0 1.51 KB
#5252 EnrichedLog net6.0 1.52μs 1.02ns 3.95ns 0.0223 0 0 1.58 KB
#5252 EnrichedLog netcoreapp3.1 2.18μs 6.11ns 23.7ns 0.0214 0 0 1.58 KB
#5252 EnrichedLog net472 2.41μs 2.82ns 10.9ns 0.24 0 0 1.51 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 227ns 879ns 0.0566 0 0 4.22 KB
master EnrichedLog netcoreapp3.1 118μs 89.8ns 336ns 0.0589 0 0 4.22 KB
master EnrichedLog net472 148μs 85.6ns 331ns 0.663 0.221 0 4.4 KB
#5252 EnrichedLog net6.0 112μs 50.9ns 191ns 0.0561 0 0 4.22 KB
#5252 EnrichedLog netcoreapp3.1 118μs 136ns 526ns 0 0 0 4.22 KB
#5252 EnrichedLog net472 148μs 170ns 659ns 0.667 0.222 0 4.4 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.13μs 0.909ns 3.52ns 0.0298 0 0 2.14 KB
master EnrichedLog netcoreapp3.1 4.12μs 2.11ns 8.18ns 0.0289 0 0 2.14 KB
master EnrichedLog net472 4.88μs 1.39ns 5.19ns 0.31 0 0 1.95 KB
#5252 EnrichedLog net6.0 3.13μs 1.61ns 6.01ns 0.0297 0 0 2.14 KB
#5252 EnrichedLog netcoreapp3.1 4.27μs 9.03ns 35ns 0.0298 0 0 2.14 KB
#5252 EnrichedLog net472 4.94μs 2.08ns 8.05ns 0.309 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.34μs 0.73ns 2.83ns 0.0153 0 0 1.11 KB
master SendReceive netcoreapp3.1 1.69μs 0.787ns 2.84ns 0.0151 0 0 1.11 KB
master SendReceive net472 2.16μs 4.56ns 17ns 0.178 0 0 1.12 KB
#5252 SendReceive net6.0 1.43μs 0.849ns 3.29ns 0.0156 0 0 1.11 KB
#5252 SendReceive netcoreapp3.1 1.76μs 0.765ns 2.96ns 0.015 0 0 1.11 KB
#5252 SendReceive net472 2.18μs 3.54ns 13.7ns 0.178 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.9μs 1.24ns 4.82ns 0.0216 0 0 1.54 KB
master EnrichedLog netcoreapp3.1 4.07μs 1.03ns 3.85ns 0.0205 0 0 1.58 KB
master EnrichedLog net472 4.2μs 1.26ns 4.9ns 0.313 0 0 1.97 KB
#5252 EnrichedLog net6.0 2.76μs 1.04ns 4.04ns 0.0207 0 0 1.54 KB
#5252 EnrichedLog netcoreapp3.1 3.95μs 1.26ns 4.73ns 0.0215 0 0 1.58 KB
#5252 EnrichedLog net472 4.32μs 1.69ns 6.32ns 0.312 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #5252

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.124 463.17 520.37

Faster :tada: in #5252

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.143 852.68 745.85

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 463ns 0.748ns 2.9ns 0.00771 0 0 544 B
master StartFinishSpan netcoreapp3.1 652ns 0.896ns 3.23ns 0.00744 0 0 544 B
master StartFinishSpan net472 782ns 2.01ns 7.77ns 0.0865 0 0 546 B
master StartFinishScope net6.0 584ns 0.937ns 3.63ns 0.00937 0 0 664 B
master StartFinishScope netcoreapp3.1 853ns 1.35ns 5.23ns 0.00919 0 0 664 B
master StartFinishScope net472 928ns 1.6ns 6.21ns 0.099 0 0 626 B
#5252 StartFinishSpan net6.0 520ns 0.42ns 1.63ns 0.00755 0 0 544 B
#5252 StartFinishSpan netcoreapp3.1 663ns 0.949ns 3.68ns 0.00745 0 0 544 B
#5252 StartFinishSpan net472 805ns 0.576ns 2.23ns 0.0865 0 0 546 B
#5252 StartFinishScope net6.0 580ns 0.666ns 2.58ns 0.00928 0 0 664 B
#5252 StartFinishScope netcoreapp3.1 747ns 0.735ns 2.85ns 0.00874 0 0 664 B
#5252 StartFinishScope net472 953ns 0.82ns 3.18ns 0.0993 0 0 626 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster :tada: Same allocations :heavy_check_mark:

Faster :tada: in #5252

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.204 702.11 583.39

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 702ns 1.27ns 4.9ns 0.0091 0 0 664 B
master RunOnMethodBegin netcoreapp3.1 1.02μs 1.77ns 6.84ns 0.00904 0 0 664 B
master RunOnMethodBegin net472 1.11μs 1.8ns 6.98ns 0.0992 0 0 626 B
#5252 RunOnMethodBegin net6.0 583ns 0.549ns 2.13ns 0.00927 0 0 664 B
#5252 RunOnMethodBegin netcoreapp3.1 924ns 0.743ns 2.88ns 0.00871 0 0 664 B
#5252 RunOnMethodBegin net472 1.15μs 1.16ns 4.5ns 0.0995 0 0 626 B

andrewlock avatar Feb 29 '24 22:02 andrewlock