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

[Profiler] Move RawSamples container in its own class

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 14 '24 12:02 gleocadie

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 (5191) - mean (74ms)  : 64, 84
     .   : milestone, 74,

    section CallTarget+Inlining+NGEN
    This PR (5191) - mean (960ms)  : 942, 978
     .   : milestone, 960,

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

    section CallTarget+Inlining+NGEN
    This PR (5191) - mean (699ms)  : 626, 772
     .   : milestone, 699,

gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5191) - mean (100ms)  : 93, 108
     .   : milestone, 100,

    section CallTarget+Inlining+NGEN
    This PR (5191) - mean (710ms)  : 650, 770
     .   : milestone, 710,

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

    section CallTarget+Inlining+NGEN
    This PR (5191) - mean (1,067ms)  : 1045, 1090
     .   : milestone, 1067,
    master - mean (1,061ms)  : 1040, 1082
     .   : milestone, 1061,

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

    section CallTarget+Inlining+NGEN
    This PR (5191) - mean (1,062ms)  : 1039, 1085
     .   : milestone, 1062,
    master - mean (1,062ms)  : 1034, 1090
     .   : milestone, 1062,

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

    section CallTarget+Inlining+NGEN
    This PR (5191) - mean (999ms)  : 971, 1027
     .   : milestone, 999,
    master - mean (1,001ms)  : 978, 1024
     .   : milestone, 1001,

andrewlock avatar Feb 14 '24 13:02 andrewlock

Datadog Report

Branch report: gleocadie/move-rawsamples-in-its-own-class Commit report: 4ba8e85 Test service: dd-trace-dotnet

:x: 8 Failed (2 Known Flaky), 130022 Passed, 557 Skipped, 41m 27.9s Wall Time

:x: Failed Tests (8)

This report shows up to 5 failed tests.

  • CheckSpanContextAreAttachedForCpuProfiler - Datadog.Profiler.IntegrationTests.CodeHotspot.CodeHotspotTest - Details

    Expand for error
    xit code of "Samples.BuggyBits.exe" should be 0 instead of -1073741819 (= 0xC0000005)
    xpected: True
    ctual:   False
    
  • CheckCpuTimeForGcThreadsIsReported - Datadog.Profiler.IntegrationTests.GarbageCollections.GarbageCollectorCpuTimeTest - :snowflake: Known flaky - Details

    Expand for error
    xit code of "Samples.Computer01.exe" should be 0 instead of -2146233082 (= 0x80131506)
    xpected: True
    ctual:   False
    
  • CheckCpuTimeForGcThreadsIsReported - Datadog.Profiler.IntegrationTests.GarbageCollections.GarbageCollectorCpuTimeTest - :snowflake: Known flaky - Details

    Expand for error
    xit code of "Samples.Computer01.exe" should be 0 instead of -2146233082 (= 0x80131506)
    xpected: True
    ctual:   False
    
  • CheckNoGcSampleIfFeatureDeactivated - Datadog.Profiler.IntegrationTests.GarbageCollections.GarbageCollectorCpuTimeTest - Details

    Expand for error
    xit code of "Samples.Computer01.exe" should be 0 instead of -1073740791 (= 0xC0000409)
    xpected: True
    ctual:   False
    
  • CheckNoGcSampleIfFeatureDeactivated - Datadog.Profiler.IntegrationTests.GarbageCollections.GarbageCollectorCpuTimeTest - Details

    Expand for error
    xit code of "Samples.Computer01.exe" should be 0 instead of -1073740791 (= 0xC0000409)
    xpected: True
    ctual:   False
    

datadog-ddstaging[bot] avatar Feb 14 '24 13:02 datadog-ddstaging[bot]

Benchmarks Report :snail:

Benchmarks for #5191 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.174
  • 4 benchmarks are slower, with geometric mean 1.173
  • 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.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.92μs 48.6ns 283ns 0.0258 0.00859 0 7.5 KB
master StartStopWithChild netcoreapp3.1 10.9μs 59.9ns 359ns 0.0351 0.015 0 7.59 KB
master StartStopWithChild net472 17.3μs 55.2ns 207ns 1.32 0.327 0.103 7.96 KB
#5191 StartStopWithChild net6.0 8.8μs 50.5ns 374ns 0.0254 0.0127 0 7.49 KB
#5191 StartStopWithChild netcoreapp3.1 11.7μs 61.2ns 306ns 0.0295 0.0118 0 7.59 KB
#5191 StartStopWithChild net472 17.3μs 48.8ns 189ns 1.35 0.352 0.12 7.97 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 450μs 158ns 611ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 629μs 256ns 993ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 787μs 220ns 853ns 0.393 0 0 3.3 KB
#5191 WriteAndFlushEnrichedTraces net6.0 462μs 93.6ns 363ns 0 0 0 2.7 KB
#5191 WriteAndFlushEnrichedTraces netcoreapp3.1 610μs 324ns 1.26μs 0 0 0 2.7 KB
#5191 WriteAndFlushEnrichedTraces net472 780μs 269ns 1.04μs 0.388 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #5191

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑netcoreapp3.1 1.178 208.70 245.81

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 41.3μs 17.9ns 69.2ns 0.0204 0 0 2.36 KB
master AllCycleSimpleBody netcoreapp3.1 43.8μs 43.5ns 157ns 0.0218 0 0 2.34 KB
master AllCycleSimpleBody net472 46.5μs 8.49ns 30.6ns 0.37 0 0 2.41 KB
master AllCycleMoreComplexBody net6.0 215μs 94.6ns 354ns 0.107 0 0 9.84 KB
master AllCycleMoreComplexBody netcoreapp3.1 227μs 208ns 807ns 0.113 0 0 9.73 KB
master AllCycleMoreComplexBody net472 238μs 63.5ns 246ns 1.55 0 0 9.91 KB
master ObjectExtractorSimpleBody net6.0 142ns 0.0833ns 0.323ns 0.00395 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.271ns 0.939ns 0.00375 0 0 272 B
master ObjectExtractorSimpleBody net472 163ns 0.0875ns 0.339ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.06μs 0.918ns 3.31ns 0.0535 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.98μs 1.09ns 3.95ns 0.0499 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.71μs 2.01ns 7.78ns 0.603 0.00558 0 3.8 KB
#5191 AllCycleSimpleBody net6.0 41.4μs 50.2ns 194ns 0.0207 0 0 2.36 KB
#5191 AllCycleSimpleBody netcoreapp3.1 43.6μs 13.9ns 52.1ns 0.0218 0 0 2.34 KB
#5191 AllCycleSimpleBody net472 47.1μs 14ns 54.3ns 0.377 0 0 2.41 KB
#5191 AllCycleMoreComplexBody net6.0 214μs 91.4ns 354ns 0.106 0 0 9.84 KB
#5191 AllCycleMoreComplexBody netcoreapp3.1 226μs 257ns 994ns 0.112 0 0 9.73 KB
#5191 AllCycleMoreComplexBody net472 238μs 49.9ns 187ns 1.55 0 0 9.91 KB
#5191 ObjectExtractorSimpleBody net6.0 140ns 0.082ns 0.307ns 0.0039 0 0 280 B
#5191 ObjectExtractorSimpleBody netcoreapp3.1 246ns 0.128ns 0.462ns 0.00373 0 0 272 B
#5191 ObjectExtractorSimpleBody net472 160ns 0.0871ns 0.337ns 0.0446 0 0 281 B
#5191 ObjectExtractorMoreComplexBody net6.0 3.08μs 1.08ns 3.89ns 0.0522 0 0 3.78 KB
#5191 ObjectExtractorMoreComplexBody netcoreapp3.1 4.02μs 1.83ns 7.08ns 0.0501 0 0 3.69 KB
#5191 ObjectExtractorMoreComplexBody net472 3.75μs 2.42ns 9.04ns 0.603 0.00564 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 55.4μs 59.8ns 216ns 0.418 0 0 30.94 KB
master EncodeArgs netcoreapp3.1 69.3μs 64.9ns 243ns 0.416 0 0 31.47 KB
master EncodeArgs net472 83.9μs 67.6ns 262ns 5.11 0.0838 0 32.27 KB
master EncodeLegacyArgs net6.0 127μs 194ns 752ns 0.439 0 0 33.89 KB
master EncodeLegacyArgs netcoreapp3.1 159μs 331ns 1.28μs 0.463 0 0 34.09 KB
master EncodeLegacyArgs net472 208μs 104ns 362ns 5.53 0.417 0 35 KB
#5191 EncodeArgs net6.0 52.8μs 43.3ns 156ns 0.424 0 0 30.94 KB
#5191 EncodeArgs netcoreapp3.1 69.8μs 50.2ns 188ns 0.419 0 0 31.47 KB
#5191 EncodeArgs net472 83.5μs 49.9ns 187ns 5.1 0.0836 0 32.27 KB
#5191 EncodeLegacyArgs net6.0 122μs 223ns 834ns 0.535 0.0595 0.0595 33.89 KB
#5191 EncodeLegacyArgs netcoreapp3.1 157μs 774ns 3.28μs 0.457 0 0 34.09 KB
#5191 EncodeLegacyArgs net472 212μs 933ns 3.61μs 5.46 0.42 0 35 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 192μs 90.9ns 340ns 0 0 0 6.51 KB
master RunWafRealisticBenchmark netcoreapp3.1 203μs 177ns 663ns 0 0 0 6.49 KB
master RunWafRealisticBenchmark net472 223μs 138ns 535ns 1 0 0 6.59 KB
master RunWafRealisticBenchmarkWithAttack net6.0 126μs 545ns 2.11μs 0.0638 0 0 4.15 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 256ns 993ns 0 0 0 4.14 KB
master RunWafRealisticBenchmarkWithAttack net472 146μs 40.4ns 151ns 0.658 0 0 4.19 KB
#5191 RunWafRealisticBenchmark net6.0 193μs 168ns 652ns 0.0953 0 0 6.51 KB
#5191 RunWafRealisticBenchmark netcoreapp3.1 204μs 249ns 966ns 0 0 0 6.49 KB
#5191 RunWafRealisticBenchmark net472 225μs 137ns 531ns 1.02 0 0 6.59 KB
#5191 RunWafRealisticBenchmarkWithAttack net6.0 125μs 67.8ns 262ns 0.0633 0 0 4.15 KB
#5191 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 134μs 82.5ns 309ns 0 0 0 4.14 KB
#5191 RunWafRealisticBenchmarkWithAttack net472 147μs 67.2ns 260ns 0.659 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 117ns 439ns 0.257 0 0 18.26 KB
master SendRequest netcoreapp3.1 194μs 208ns 804ns 0.193 0 0 20.42 KB
master SendRequest net472 0.000192ns 0.000118ns 0.000456ns 0 0 0 0 b
#5191 SendRequest net6.0 174μs 75.9ns 294ns 0.174 0 0 18.26 KB
#5191 SendRequest netcoreapp3.1 194μs 166ns 623ns 0.145 0 0 20.42 KB
#5191 SendRequest net472 0.00106ns 0.000405ns 0.0014ns 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 544μs 1.44μs 5.58μs 0.534 0 0 41.55 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 1.2μs 4.66μs 0.324 0 0 41.83 KB
master WriteAndFlushEnrichedTraces net472 843μs 2.71μs 10.5μs 8.28 2.48 0.414 53.24 KB
#5191 WriteAndFlushEnrichedTraces net6.0 525μs 447ns 1.55μs 0.548 0 0 41.49 KB
#5191 WriteAndFlushEnrichedTraces netcoreapp3.1 659μs 816ns 3.05μs 0.324 0 0 41.87 KB
#5191 WriteAndFlushEnrichedTraces net472 830μs 3.12μs 11.7μs 8.33 2.5 0.417 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.12μs 0.408ns 1.53ns 0.0107 0 0 776 B
master ExecuteNonQuery netcoreapp3.1 1.51μs 0.94ns 3.64ns 0.0105 0 0 776 B
master ExecuteNonQuery net472 1.85μs 1.27ns 4.9ns 0.117 0 0 738 B
#5191 ExecuteNonQuery net6.0 1.04μs 0.729ns 2.82ns 0.0109 0 0 776 B
#5191 ExecuteNonQuery netcoreapp3.1 1.53μs 1.54ns 5.77ns 0.00994 0 0 776 B
#5191 ExecuteNonQuery net472 1.75μs 0.73ns 2.83ns 0.117 0 0 738 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.2μs 0.534ns 2.07ns 0.0133 0 0 944 B
master CallElasticsearch netcoreapp3.1 1.59μs 1.88ns 7.3ns 0.0128 0 0 944 B
master CallElasticsearch net472 2.5μs 1.13ns 4.38ns 0.152 0 0 963 B
master CallElasticsearchAsync net6.0 1.29μs 0.651ns 2.52ns 0.0129 0 0 920 B
master CallElasticsearchAsync netcoreapp3.1 1.59μs 0.738ns 2.76ns 0.0134 0 0 992 B
master CallElasticsearchAsync net472 2.64μs 3.73ns 14.5ns 0.161 0 0 1.02 KB
#5191 CallElasticsearch net6.0 1.19μs 0.374ns 1.45ns 0.0132 0 0 944 B
#5191 CallElasticsearch netcoreapp3.1 1.44μs 0.777ns 2.8ns 0.0125 0 0 944 B
#5191 CallElasticsearch net472 2.51μs 1.04ns 4.02ns 0.152 0 0 963 B
#5191 CallElasticsearchAsync net6.0 1.35μs 0.723ns 2.8ns 0.0129 0 0 920 B
#5191 CallElasticsearchAsync netcoreapp3.1 1.59μs 3.19ns 11.9ns 0.0134 0 0 992 B
#5191 CallElasticsearchAsync net472 2.74μs 1.67ns 6.47ns 0.161 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.3μs 0.64ns 2.39ns 0.0131 0 0 920 B
master ExecuteAsync netcoreapp3.1 1.63μs 0.908ns 3.4ns 0.0122 0 0 920 B
master ExecuteAsync net472 1.79μs 1ns 3.87ns 0.14 0 0 883 B
#5191 ExecuteAsync net6.0 1.28μs 3.34ns 12ns 0.0128 0 0 920 B
#5191 ExecuteAsync netcoreapp3.1 1.59μs 0.571ns 2.21ns 0.012 0 0 920 B
#5191 ExecuteAsync net472 1.94μs 1.27ns 4.92ns 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.16μs 0.931ns 3.36ns 0.0292 0 0 2.1 KB
master SendAsync netcoreapp3.1 4.96μs 2.65ns 9.9ns 0.0347 0 0 2.64 KB
master SendAsync net472 7.77μs 3.72ns 13.9ns 0.525 0 0 3.31 KB
#5191 SendAsync net6.0 4.13μs 4.3ns 16.1ns 0.0287 0 0 2.1 KB
#5191 SendAsync netcoreapp3.1 5.11μs 2.49ns 8.98ns 0.0358 0 0 2.64 KB
#5191 SendAsync net472 7.6μs 4.12ns 16ns 0.525 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower :warning: More allocations :warning:

Slower :warning: in #5191

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 1.180 52,300.00 61,700.00 multimodal

More allocations :warning: in #5191

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 204.22 KB 212.5 KB 8.27 KB 4.05%

Fewer allocations :tada: in #5191

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 60.75 KB 59.1 KB -1.65 KB -2.71%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 51.7μs 255ns 1.05μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 52.8μs 256ns 1.06μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.1μs 133ns 479ns 0 0 0 60.75 KB
master StringConcatAspectBenchmark net6.0 266μs 1.15μs 6.18μs 0 0 0 204.22 KB
master StringConcatAspectBenchmark netcoreapp3.1 306μs 1.66μs 9.37μs 0 0 0 203.8 KB
master StringConcatAspectBenchmark net472 234μs 3.37μs 32.2μs 0 0 0 221.18 KB
#5191 StringConcatBenchmark net6.0 50.9μs 122ns 455ns 0 0 0 43.44 KB
#5191 StringConcatBenchmark netcoreapp3.1 62.9μs 865ns 8.6μs 0 0 0 42.64 KB
#5191 StringConcatBenchmark net472 38.2μs 104ns 390ns 0 0 0 59.1 KB
#5191 StringConcatAspectBenchmark net6.0 271μs 1.04μs 4.04μs 0 0 0 212.5 KB
#5191 StringConcatAspectBenchmark netcoreapp3.1 284μs 1.41μs 7.33μs 0 0 0 202.98 KB
#5191 StringConcatAspectBenchmark net472 250μs 4.88μs 47.1μs 0 0 0 221.18 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.748ns 2.9ns 0.0219 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 2.22μs 0.888ns 3.2ns 0.0213 0 0 1.58 KB
master EnrichedLog net472 2.7μs 7.69ns 29.8ns 0.239 0 0 1.51 KB
#5191 EnrichedLog net6.0 1.49μs 0.696ns 2.69ns 0.0218 0 0 1.58 KB
#5191 EnrichedLog netcoreapp3.1 2.27μs 0.958ns 3.59ns 0.0216 0 0 1.58 KB
#5191 EnrichedLog net472 2.74μs 1.39ns 5.37ns 0.239 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 113μs 194ns 753ns 0.0562 0 0 4.22 KB
master EnrichedLog netcoreapp3.1 118μs 104ns 388ns 0 0 0 4.22 KB
master EnrichedLog net472 149μs 127ns 477ns 0.67 0.223 0 4.4 KB
#5191 EnrichedLog net6.0 113μs 71.4ns 276ns 0.0561 0 0 4.22 KB
#5191 EnrichedLog netcoreapp3.1 118μs 94.7ns 341ns 0.0586 0 0 4.22 KB
#5191 EnrichedLog net472 147μs 117ns 455ns 0.662 0.221 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 2.91μs 0.868ns 3.36ns 0.0292 0 0 2.14 KB
master EnrichedLog netcoreapp3.1 4.15μs 1.27ns 4.59ns 0.0289 0 0 2.14 KB
master EnrichedLog net472 4.86μs 1.91ns 7.41ns 0.309 0 0 1.95 KB
#5191 EnrichedLog net6.0 3μs 1.46ns 5.46ns 0.0299 0 0 2.14 KB
#5191 EnrichedLog netcoreapp3.1 4.15μs 1.03ns 3.84ns 0.0289 0 0 2.14 KB
#5191 EnrichedLog net472 4.77μs 2.36ns 9.12ns 0.31 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.38μs 0.851ns 3.29ns 0.0159 0 0 1.11 KB
master SendReceive netcoreapp3.1 1.73μs 0.931ns 3.36ns 0.0155 0 0 1.11 KB
master SendReceive net472 2.2μs 2.98ns 11.5ns 0.178 0 0 1.12 KB
#5191 SendReceive net6.0 1.32μs 0.841ns 3.26ns 0.0159 0 0 1.11 KB
#5191 SendReceive netcoreapp3.1 1.81μs 1.12ns 4.21ns 0.0145 0 0 1.11 KB
#5191 SendReceive net472 2.13μs 2.3ns 8.9ns 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.66μs 1.01ns 3.78ns 0.0214 0 0 1.54 KB
master EnrichedLog netcoreapp3.1 3.97μs 1.8ns 6.97ns 0.0219 0 0 1.58 KB
master EnrichedLog net472 4.33μs 1.3ns 4.86ns 0.312 0 0 1.97 KB
#5191 EnrichedLog net6.0 2.84μs 0.874ns 3.27ns 0.0222 0 0 1.54 KB
#5191 EnrichedLog netcoreapp3.1 3.84μs 4.82ns 18.7ns 0.0212 0 0 1.58 KB
#5191 EnrichedLog net472 4.28μs 2.96ns 11.5ns 0.312 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #5191

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.164 550.20 640.24

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 482ns 0.194ns 0.75ns 0.00749 0 0 544 B
master StartFinishSpan netcoreapp3.1 678ns 0.296ns 1.11ns 0.00757 0 0 544 B
master StartFinishSpan net472 758ns 0.453ns 1.76ns 0.0863 0.000377 0 546 B
master StartFinishScope net6.0 550ns 0.258ns 0.998ns 0.00938 0 0 664 B
master StartFinishScope netcoreapp3.1 860ns 0.213ns 0.767ns 0.00861 0 0 664 B
master StartFinishScope net472 967ns 0.7ns 2.71ns 0.0991 0 0 626 B
#5191 StartFinishSpan net6.0 461ns 0.221ns 0.856ns 0.00765 0 0 544 B
#5191 StartFinishSpan netcoreapp3.1 666ns 2.75ns 10.3ns 0.00748 0 0 544 B
#5191 StartFinishSpan net472 725ns 0.152ns 0.59ns 0.0865 0 0 546 B
#5191 StartFinishScope net6.0 640ns 0.183ns 0.71ns 0.00943 0 0 664 B
#5191 StartFinishScope netcoreapp3.1 923ns 0.39ns 1.51ns 0.00871 0 0 664 B
#5191 StartFinishScope net472 1.06μs 0.389ns 1.5ns 0.099 0 0 626 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower :warning: Same allocations :heavy_check_mark:

Slower :warning: in #5191

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 1.171 863.72 1,011.21

Faster :tada: in #5191

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.174 767.77 653.91

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 768ns 0.599ns 2.32ns 0.00908 0 0 664 B
master RunOnMethodBegin netcoreapp3.1 863ns 0.454ns 1.7ns 0.00901 0 0 664 B
master RunOnMethodBegin net472 1.06μs 0.396ns 1.53ns 0.0993 0 0 626 B
#5191 RunOnMethodBegin net6.0 654ns 0.2ns 0.776ns 0.00913 0 0 664 B
#5191 RunOnMethodBegin netcoreapp3.1 1.01μs 0.278ns 1.08ns 0.00915 0 0 664 B
#5191 RunOnMethodBegin net472 1.13μs 0.339ns 1.31ns 0.0993 0 0 626 B

andrewlock avatar Feb 14 '24 13:02 andrewlock