Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nacho/context disposed related exceptions #6529

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

NachoEchevarria
Copy link
Contributor

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

@andrewlock
Copy link
Member

andrewlock commented Jan 10, 2025

Execution-Time Benchmarks Report ⏱️

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 (6529) - mean (68ms)  : 66, 71
     .   : milestone, 68,
    master - mean (69ms)  : 66, 71
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6529) - mean (979ms)  : 956, 1003
     .   : milestone, 979,
    master - mean (980ms)  : 949, 1011
     .   : milestone, 980,

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

    section CallTarget+Inlining+NGEN
    This PR (6529) - mean (675ms)  : 662, 688
     .   : milestone, 675,
    master - mean (681ms)  : 665, 697
     .   : milestone, 681,

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

    section CallTarget+Inlining+NGEN
    This PR (6529) - mean (632ms)  : 617, 646
     .   : milestone, 632,
    master - mean (636ms)  : 618, 654
     .   : milestone, 636,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6529) - mean (194ms)  : 189, 199
     .   : milestone, 194,
    master - mean (195ms)  : 189, 200
     .   : milestone, 195,

    section CallTarget+Inlining+NGEN
    This PR (6529) - mean (1,104ms)  : 1079, 1128
     .   : milestone, 1104,
    master - mean (1,105ms)  : 1078, 1131
     .   : milestone, 1105,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6529) - mean (278ms)  : 274, 282
     .   : milestone, 278,
    master - mean (279ms)  : 275, 283
     .   : milestone, 279,

    section CallTarget+Inlining+NGEN
    This PR (6529) - mean (870ms)  : 844, 896
     .   : milestone, 870,
    master - mean (875ms)  : 850, 900
     .   : milestone, 875,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6529) - mean (268ms)  : 263, 272
     .   : milestone, 268,
    master - mean (268ms)  : 264, 272
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (6529) - mean (849ms)  : 820, 878
     .   : milestone, 849,
    master - mean (853ms)  : 824, 881
     .   : milestone, 853,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 10, 2025

Datadog Report

Branch report: nacho/ContextDisposedRelatedExceptions
Commit report: 059d261
Test service: dd-trace-dotnet

❌ 1 Failed (0 Known Flaky), 242737 Passed, 2096 Skipped, 19h 34m 10.31s Total Time

❌ Failed Tests (1)

  • EarlyFlakeDetection - Datadog.Trace.ClrProfiler.IntegrationTests.CI.NUnitEvpTests - Details

    Expand for error
     The sample did not exit in 600000ms. Memory dump taken: True. Killing process.
    

@andrewlock
Copy link
Member

andrewlock commented Jan 10, 2025

Benchmarks Report for appsec 🐌

Benchmarks for #6529 compared to master:

  • All benchmarks have the same speed
  • 3 benchmarks have fewer 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 ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 205μs 125ns 468ns 2.65 0 0 188.76 KB
master AllCycleSimpleBody netcoreapp3.1 312μs 150ns 582ns 2.65 0 0 196.09 KB
master AllCycleSimpleBody net472 270μs 553ns 2.14μs 35.9 2.04 0 225.78 KB
master AllCycleMoreComplexBody net6.0 207μs 150ns 559ns 2.69 0 0 192.26 KB
master AllCycleMoreComplexBody netcoreapp3.1 321μs 173ns 669ns 2.73 0 0 199.5 KB
master AllCycleMoreComplexBody net472 273μs 165ns 596ns 36.4 2.05 0 229.3 KB
master ObjectExtractorSimpleBody net6.0 140ns 0.167ns 0.647ns 0.00392 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 200ns 0.134ns 0.5ns 0.00375 0 0 272 B
master ObjectExtractorSimpleBody net472 166ns 0.132ns 0.511ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 2.89μs 1.68ns 6.3ns 0.0535 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.84μs 2.01ns 7.51ns 0.0504 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.62μs 5.1ns 19.8ns 0.603 0.00541 0 3.8 KB
#6529 AllCycleSimpleBody net6.0 203μs 99.7ns 373ns 2.66 0 0 188.76 KB
#6529 AllCycleSimpleBody netcoreapp3.1 311μs 185ns 691ns 2.64 0 0 196.09 KB
#6529 AllCycleSimpleBody net472 267μs 252ns 975ns 35.8 1.99 0 225.75 KB
#6529 AllCycleMoreComplexBody net6.0 208μs 88.7ns 332ns 2.72 0 0 192.26 KB
#6529 AllCycleMoreComplexBody netcoreapp3.1 318μs 107ns 385ns 2.7 0 0 199.5 KB
#6529 AllCycleMoreComplexBody net472 277μs 347ns 1.34μs 36.4 2.07 0 229.27 KB
#6529 ObjectExtractorSimpleBody net6.0 141ns 0.188ns 0.727ns 0.00391 0 0 280 B
#6529 ObjectExtractorSimpleBody netcoreapp3.1 191ns 0.208ns 0.779ns 0.00375 0 0 272 B
#6529 ObjectExtractorSimpleBody net472 164ns 0.189ns 0.707ns 0.0446 0 0 281 B
#6529 ObjectExtractorMoreComplexBody net6.0 2.96μs 2.65ns 9.9ns 0.0534 0 0 3.78 KB
#6529 ObjectExtractorMoreComplexBody netcoreapp3.1 3.77μs 3.25ns 12.6ns 0.049 0 0 3.69 KB
#6529 ObjectExtractorMoreComplexBody net472 3.75μs 9.4ns 36.4ns 0.603 0.00571 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 37.9μs 30.9ns 120ns 0.457 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.4μs 38.1ns 147ns 0.433 0 0 32.4 KB
master EncodeArgs net472 67.5μs 55.1ns 199ns 5.14 0.0671 0 32.5 KB
master EncodeLegacyArgs net6.0 73.9μs 73.2ns 274ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 104μs 68.8ns 266ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 156μs 55ns 213ns 0.311 0 0 2.15 KB
#6529 EncodeArgs net6.0 37.3μs 24.5ns 91.8ns 0.447 0 0 32.4 KB
#6529 EncodeArgs netcoreapp3.1 54.8μs 22.5ns 81.1ns 0.435 0 0 32.4 KB
#6529 EncodeArgs net472 67.2μs 80.7ns 313ns 5.14 0.0668 0 32.5 KB
#6529 EncodeLegacyArgs net6.0 74.3μs 32.9ns 127ns 0 0 0 2.14 KB
#6529 EncodeLegacyArgs netcoreapp3.1 107μs 119ns 459ns 0 0 0 2.14 KB
#6529 EncodeLegacyArgs net472 154μs 113ns 438ns 0.308 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 175μs 119ns 462ns 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 189μs 146ns 567ns 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 202μs 116ns 449ns 0.302 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 117μs 42.2ns 158ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 124μs 168ns 650ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 133μs 60.1ns 233ns 0.199 0 0 1.49 KB
#6529 RunWafRealisticBenchmark net6.0 175μs 317ns 1.23μs 0 0 0 2.44 KB
#6529 RunWafRealisticBenchmark netcoreapp3.1 186μs 105ns 408ns 0 0 0 2.39 KB
#6529 RunWafRealisticBenchmark net472 200μs 153ns 594ns 0.3 0 0 2.46 KB
#6529 RunWafRealisticBenchmarkWithAttack net6.0 115μs 52.1ns 195ns 0 0 0 1.47 KB
#6529 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 123μs 73.5ns 285ns 0 0 0 1.46 KB
#6529 RunWafRealisticBenchmarkWithAttack net472 133μs 99.9ns 387ns 0.198 0 0 1.49 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6529

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 255.81 KB 254.31 KB -1.5 KB -0.58%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 282.36 KB 278.53 KB -3.83 KB -1.36%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 262.71 KB 254.42 KB -8.3 KB -3.16%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 57.9μs 793ns 7.85μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 53.7μs 258ns 1.06μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 38.2μs 174ns 673ns 0 0 0 59.18 KB
master StringConcatAspectBenchmark net6.0 309μs 1.59μs 8.42μs 0 0 0 255.81 KB
master StringConcatAspectBenchmark netcoreapp3.1 360μs 1.98μs 14.6μs 0 0 0 262.71 KB
master StringConcatAspectBenchmark net472 244μs 1.24μs 5.68μs 0 0 0 282.36 KB
#6529 StringConcatBenchmark net6.0 58.4μs 693ns 6.86μs 0 0 0 43.44 KB
#6529 StringConcatBenchmark netcoreapp3.1 53.1μs 247ns 926ns 0 0 0 42.64 KB
#6529 StringConcatBenchmark net472 37.6μs 108ns 390ns 0 0 0 59.26 KB
#6529 StringConcatAspectBenchmark net6.0 298μs 4.97μs 47.2μs 0 0 0 254.31 KB
#6529 StringConcatAspectBenchmark netcoreapp3.1 309μs 5.5μs 54.2μs 0 0 0 254.42 KB
#6529 StringConcatAspectBenchmark net472 293μs 6.2μs 60.1μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

andrewlock commented Jan 10, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6529 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.190
  • 1 benchmarks are slower, with geometric mean 1.140
  • 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 ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.14μs 46.5ns 332ns 0.0166 0.00829 0 5.62 KB
master StartStopWithChild netcoreapp3.1 10.2μs 54ns 270ns 0.0249 0.00998 0 5.8 KB
master StartStopWithChild net472 16.4μs 40.3ns 156ns 1.04 0.299 0.097 6.21 KB
#6529 StartStopWithChild net6.0 8.1μs 45ns 270ns 0.0162 0.0081 0 5.61 KB
#6529 StartStopWithChild netcoreapp3.1 10.4μs 55.5ns 294ns 0.0257 0.0103 0 5.8 KB
#6529 StartStopWithChild net472 16.6μs 48.5ns 188ns 1.03 0.299 0.083 6.21 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 487μs 340ns 1.27μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 644μs 504ns 1.88μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 860μs 627ns 2.35μs 0.428 0 0 3.3 KB
#6529 WriteAndFlushEnrichedTraces net6.0 483μs 1.01μs 3.63μs 0 0 0 2.7 KB
#6529 WriteAndFlushEnrichedTraces netcoreapp3.1 666μs 539ns 2.09μs 0 0 0 2.7 KB
#6529 WriteAndFlushEnrichedTraces net472 867μs 742ns 2.87μs 0.431 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6529

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 1.319 202,030.65 153,198.15

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 200μs 2.29μs 22.9μs 0.149 0 0 14.47 KB
master SendRequest netcoreapp3.1 163μs 851ns 4.08μs 0.164 0 0 17.27 KB
master SendRequest net472 0.000792ns 0.000371ns 0.00139ns 0 0 0 0 b
#6529 SendRequest net6.0 154μs 902ns 8.37μs 0.156 0 0 14.47 KB
#6529 SendRequest netcoreapp3.1 177μs 1.03μs 9.27μs 0.163 0 0 17.27 KB
#6529 SendRequest net472 0.00585ns 0.00205ns 0.00793ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 550μs 2.6μs 10.1μs 0.551 0 0 41.65 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 663μs 3.68μs 24.2μs 0.334 0 0 41.61 KB
master WriteAndFlushEnrichedTraces net472 861μs 4.24μs 19.4μs 8.33 2.5 0.417 53.3 KB
#6529 WriteAndFlushEnrichedTraces net6.0 568μs 3.02μs 16μs 0.561 0 0 41.57 KB
#6529 WriteAndFlushEnrichedTraces netcoreapp3.1 660μs 3.48μs 22.8μs 0.324 0 0 41.81 KB
#6529 WriteAndFlushEnrichedTraces net472 853μs 4.18μs 16.7μs 8.33 2.5 0.417 53.28 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.28μs 0.818ns 3.06ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.85μs 1.47ns 5.51ns 0.0138 0 0 1.02 KB
master ExecuteNonQuery net472 2.14μs 2.37ns 8.88ns 0.157 0.00107 0 987 B
#6529 ExecuteNonQuery net6.0 1.36μs 1.55ns 5.99ns 0.0143 0 0 1.02 KB
#6529 ExecuteNonQuery netcoreapp3.1 1.8μs 1.32ns 5.11ns 0.0135 0 0 1.02 KB
#6529 ExecuteNonQuery net472 2.11μs 1.06ns 3.97ns 0.157 0.00105 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6529

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.134 1,287.90 1,135.62

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.29μs 1.77ns 6.84ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.56μs 1.16ns 4.49ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.47μs 1.52ns 5.47ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.46μs 0.676ns 2.62ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.69μs 2.41ns 9.33ns 0.0141 0 0 1.02 KB
master CallElasticsearchAsync net472 2.57μs 1.49ns 5.36ns 0.166 0 0 1.05 KB
#6529 CallElasticsearch net6.0 1.14μs 0.853ns 3.19ns 0.0136 0 0 976 B
#6529 CallElasticsearch netcoreapp3.1 1.49μs 0.699ns 2.62ns 0.0127 0 0 976 B
#6529 CallElasticsearch net472 2.56μs 2.08ns 8.04ns 0.157 0 0 995 B
#6529 CallElasticsearchAsync net6.0 1.36μs 0.75ns 2.7ns 0.0129 0 0 952 B
#6529 CallElasticsearchAsync netcoreapp3.1 1.74μs 0.595ns 2.31ns 0.0141 0 0 1.02 KB
#6529 CallElasticsearchAsync net472 2.7μs 1.69ns 6.53ns 0.167 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.21μs 0.432ns 1.67ns 0.0133 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.71μs 0.505ns 1.89ns 0.0128 0 0 952 B
master ExecuteAsync net472 1.82μs 0.592ns 2.29ns 0.145 0 0 915 B
#6529 ExecuteAsync net6.0 1.28μs 0.7ns 2.71ns 0.0129 0 0 952 B
#6529 ExecuteAsync netcoreapp3.1 1.62μs 0.551ns 2.06ns 0.013 0 0 952 B
#6529 ExecuteAsync net472 1.82μs 0.508ns 1.97ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.41μs 2.36ns 8.19ns 0.0309 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.28μs 2.82ns 10.9ns 0.0371 0 0 2.85 KB
master SendAsync net472 7.45μs 2.64ns 9.52ns 0.494 0 0 3.12 KB
#6529 SendAsync net6.0 4.39μs 1.47ns 5.49ns 0.032 0 0 2.31 KB
#6529 SendAsync netcoreapp3.1 5.42μs 1.74ns 6.51ns 0.038 0 0 2.85 KB
#6529 SendAsync net472 7.37μs 1.76ns 6.57ns 0.493 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.55μs 0.838ns 3.14ns 0.0234 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.23μs 0.748ns 2.7ns 0.0223 0 0 1.64 KB
master EnrichedLog net472 2.73μs 1.3ns 4.49ns 0.249 0 0 1.57 KB
#6529 EnrichedLog net6.0 1.54μs 0.745ns 2.68ns 0.0231 0 0 1.64 KB
#6529 EnrichedLog netcoreapp3.1 2.11μs 1.17ns 4.55ns 0.022 0 0 1.64 KB
#6529 EnrichedLog net472 2.69μs 1.25ns 4.67ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 117μs 147ns 569ns 0.0589 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 121μs 226ns 877ns 0 0 0 4.28 KB
master EnrichedLog net472 151μs 174ns 674ns 0.678 0.226 0 4.46 KB
#6529 EnrichedLog net6.0 117μs 123ns 461ns 0.0579 0 0 4.28 KB
#6529 EnrichedLog netcoreapp3.1 120μs 153ns 593ns 0.0599 0 0 4.28 KB
#6529 EnrichedLog net472 151μs 132ns 492ns 0.678 0.226 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.97μs 1.06ns 3.97ns 0.0311 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.13μs 2.2ns 8.52ns 0.0288 0 0 2.2 KB
master EnrichedLog net472 4.9μs 1.61ns 6.24ns 0.319 0 0 2.02 KB
#6529 EnrichedLog net6.0 3.05μs 1.38ns 5.36ns 0.0306 0 0 2.2 KB
#6529 EnrichedLog netcoreapp3.1 4.12μs 1.16ns 4.35ns 0.0288 0 0 2.2 KB
#6529 EnrichedLog net472 4.73μs 1.27ns 4.9ns 0.319 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.4μs 0.902ns 3.49ns 0.016 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.78μs 0.711ns 2.75ns 0.0151 0 0 1.14 KB
master SendReceive net472 2.14μs 1.38ns 5.35ns 0.183 0 0 1.16 KB
#6529 SendReceive net6.0 1.48μs 4.74ns 18.4ns 0.0162 0 0 1.14 KB
#6529 SendReceive netcoreapp3.1 1.75μs 1.44ns 5.57ns 0.0157 0 0 1.14 KB
#6529 SendReceive net472 2.16μs 1.54ns 5.95ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.7μs 0.883ns 3.3ns 0.0216 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 4.02μs 1.15ns 4.31ns 0.0222 0 0 1.65 KB
master EnrichedLog net472 4.41μs 2.71ns 10.5ns 0.324 0 0 2.04 KB
#6529 EnrichedLog net6.0 2.65μs 0.979ns 3.53ns 0.0225 0 0 1.6 KB
#6529 EnrichedLog netcoreapp3.1 3.97μs 1.72ns 6.67ns 0.0217 0 0 1.65 KB
#6529 EnrichedLog net472 4.15μs 2.1ns 7.59ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6529

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.140 652.32 743.95

Faster 🎉 in #6529

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.126 548.38 487.20

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 399ns 0.195ns 0.731ns 0.00807 0 0 576 B
master StartFinishSpan netcoreapp3.1 669ns 3.15ns 11.8ns 0.00768 0 0 576 B
master StartFinishSpan net472 726ns 0.402ns 1.56ns 0.0916 0 0 578 B
master StartFinishScope net6.0 548ns 0.251ns 0.973ns 0.00986 0 0 696 B
master StartFinishScope netcoreapp3.1 653ns 0.407ns 1.58ns 0.00946 0 0 696 B
master StartFinishScope net472 796ns 0.226ns 0.874ns 0.104 0 0 658 B
#6529 StartFinishSpan net6.0 401ns 0.213ns 0.768ns 0.00808 0 0 576 B
#6529 StartFinishSpan netcoreapp3.1 617ns 0.499ns 1.93ns 0.00783 0 0 576 B
#6529 StartFinishSpan net472 691ns 0.402ns 1.56ns 0.0918 0 0 578 B
#6529 StartFinishScope net6.0 487ns 0.206ns 0.771ns 0.00976 0 0 696 B
#6529 StartFinishScope netcoreapp3.1 743ns 0.388ns 1.5ns 0.00928 0 0 696 B
#6529 StartFinishScope net472 793ns 0.319ns 1.23ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 698ns 0.32ns 1.24ns 0.00982 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 935ns 0.366ns 1.37ns 0.00935 0 0 696 B
master RunOnMethodBegin net472 1.11μs 0.399ns 1.55ns 0.104 0 0 658 B
#6529 RunOnMethodBegin net6.0 737ns 0.254ns 0.95ns 0.00963 0 0 696 B
#6529 RunOnMethodBegin netcoreapp3.1 887ns 0.753ns 2.82ns 0.00949 0 0 696 B
#6529 RunOnMethodBegin net472 1.16μs 0.247ns 0.958ns 0.104 0 0 658 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants