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

[ASM] Fix bug RC empty key #6058

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

[ASM] Fix bug RC empty key #6058

wants to merge 1 commit into from

Conversation

e-n-0
Copy link
Member

@e-n-0 e-n-0 commented Sep 19, 2024

Summary of changes

Fixed a regression bug.
The key variable for the process updated wasn't the right one.

Test coverage

Added an integration test where it tests deletion and switch back to default rules but keep updated blocking action.

@e-n-0 e-n-0 self-assigned this Sep 19, 2024
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Sep 19, 2024

Datadog Report

Branch report: flavien/system-tests-bug
Commit report: c276ae9
Test service: dd-trace-dotnet

❌ 14 Failed (0 Known Flaky), 362928 Passed, 1973 Skipped, 15h 53m 7.92s Total Time

❌ Failed Tests (14)

This report shows up to 5 failed tests.

  • TestRemoteRules - Datadog.Trace.Security.IntegrationTests.Rcm.AspNetCore5AsmRemoteRules - Details

    Expand for error
     Results do not match.
     Differences:
     Received: Security.AspNetCore5AsmRemoteRules._.received.txt
     Verified: Security.AspNetCore5AsmRemoteRules._.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: aspnet_core.request,
     ...
    
  • TestRemoteRules - Datadog.Trace.Security.IntegrationTests.Rcm.AspNetCore5AsmRemoteRules - Details

    Expand for error
     Results do not match.
     Differences:
     Received: Security.AspNetCore5AsmRemoteRules._.received.txt
     Verified: Security.AspNetCore5AsmRemoteRules._.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: aspnet_core.request,
     ...
    
  • TestRemoteRules - Datadog.Trace.Security.IntegrationTests.Rcm.AspNetCore5AsmRemoteRules - Details

    Expand for error
     Results do not match.
     Differences:
     Received: Security.AspNetCore5AsmRemoteRules._.received.txt
     Verified: Security.AspNetCore5AsmRemoteRules._.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: aspnet_core.request,
     ...
    
  • TestRemoteRules - Datadog.Trace.Security.IntegrationTests.Rcm.AspNetCore5AsmRemoteRules - Details

    Expand for error
     Results do not match.
     Differences:
     Received: Security.AspNetCore5AsmRemoteRules._.received.txt
     Verified: Security.AspNetCore5AsmRemoteRules._.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: aspnet_core.request,
     ...
    
  • TestRemoteRules - Datadog.Trace.Security.IntegrationTests.Rcm.AspNetCore5AsmRemoteRules - Details

    Expand for error
     Results do not match.
     Differences:
     Received: Security.AspNetCore5AsmRemoteRules._.received.txt
     Verified: Security.AspNetCore5AsmRemoteRules._.verified.txt
     Received Content:
     [
       {
         TraceId: Id_1,
         SpanId: Id_2,
         Name: aspnet_core.request,
     ...
    

@andrewlock
Copy link
Member

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 (6058) - mean (71ms)  : 67, 75
     .   : milestone, 71,
    master - mean (70ms)  : 67, 73
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6058) - mean (1,106ms)  : 1081, 1131
     .   : milestone, 1106,
    master - mean (1,106ms)  : 1086, 1126
     .   : milestone, 1106,

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

    section CallTarget+Inlining+NGEN
    This PR (6058) - mean (776ms)  : 763, 790
     .   : milestone, 776,
    master - mean (781ms)  : 757, 804
     .   : milestone, 781,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6058) - mean (92ms)  : 89, 95
     .   : milestone, 92,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (6058) - mean (726ms)  : 709, 744
     .   : milestone, 726,
    master - mean (734ms)  : 717, 750
     .   : milestone, 734,

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

    section CallTarget+Inlining+NGEN
    This PR (6058) - mean (1,203ms)  : 1178, 1227
     .   : milestone, 1203,
    master - mean (1,201ms)  : 1172, 1230
     .   : milestone, 1201,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6058) - mean (277ms)  : 272, 282
     .   : milestone, 277,
    master - mean (277ms)  : 271, 282
     .   : milestone, 277,

    section CallTarget+Inlining+NGEN
    This PR (6058) - mean (951ms)  : 930, 972
     .   : milestone, 951,
    master - mean (948ms)  : 931, 964
     .   : milestone, 948,

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

    section CallTarget+Inlining+NGEN
    This PR (6058) - mean (926ms)  : 904, 947
     .   : milestone, 926,
    master - mean (933ms)  : 915, 950
     .   : milestone, 933,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for appsec 🐌

Benchmarks for #6058 compared to master:

  • All benchmarks have the same speed
  • 2 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 72μs 88.3ns 330ns 0.0721 0 0 6.01 KB
master AllCycleSimpleBody netcoreapp3.1 63.1μs 79.8ns 309ns 0.0939 0 0 6.95 KB
master AllCycleSimpleBody net472 47.5μs 36.6ns 137ns 1.31 0 0 8.34 KB
master AllCycleMoreComplexBody net6.0 79.2μs 84ns 325ns 0.12 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.4μs 177ns 685ns 0.137 0 0 10.37 KB
master AllCycleMoreComplexBody net472 54.7μs 55.4ns 214ns 1.86 0.0274 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 141ns 0.261ns 1.01ns 0.00391 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 202ns 0.196ns 0.732ns 0.00368 0 0 272 B
master ObjectExtractorSimpleBody net472 178ns 0.281ns 1.09ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.13μs 6.99ns 27.1ns 0.0532 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.98μs 2.32ns 9ns 0.0497 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.89μs 2.47ns 9.58ns 0.603 0.00585 0 3.8 KB
#6058 AllCycleSimpleBody net6.0 74.2μs 221ns 856ns 0.0732 0 0 6.01 KB
#6058 AllCycleSimpleBody netcoreapp3.1 62.4μs 133ns 516ns 0.0935 0 0 6.95 KB
#6058 AllCycleSimpleBody net472 48.9μs 30.2ns 113ns 1.32 0 0 8.34 KB
#6058 AllCycleMoreComplexBody net6.0 78.8μs 129ns 498ns 0.12 0 0 9.51 KB
#6058 AllCycleMoreComplexBody netcoreapp3.1 68.9μs 100ns 388ns 0.137 0 0 10.36 KB
#6058 AllCycleMoreComplexBody net472 55μs 53.8ns 194ns 1.87 0.0274 0 11.85 KB
#6058 ObjectExtractorSimpleBody net6.0 141ns 0.133ns 0.498ns 0.00396 0 0 280 B
#6058 ObjectExtractorSimpleBody netcoreapp3.1 196ns 0.202ns 0.781ns 0.00359 0 0 272 B
#6058 ObjectExtractorSimpleBody net472 176ns 0.0996ns 0.359ns 0.0446 0 0 281 B
#6058 ObjectExtractorMoreComplexBody net6.0 3.02μs 2.93ns 11.4ns 0.0532 0 0 3.78 KB
#6058 ObjectExtractorMoreComplexBody netcoreapp3.1 3.91μs 1.47ns 5.31ns 0.0506 0 0 3.69 KB
#6058 ObjectExtractorMoreComplexBody net472 3.81μs 1.47ns 5.31ns 0.603 0.00572 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 38.1μs 43.1ns 167ns 0.458 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.7μs 50.4ns 195ns 0.437 0 0 32.4 KB
master EncodeArgs net472 65.4μs 17.5ns 63.1ns 5.15 0.0655 0 32.5 KB
master EncodeLegacyArgs net6.0 68.9μs 43.8ns 170ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 106μs 116ns 449ns 0 0 0 2.15 KB
master EncodeLegacyArgs net472 153μs 108ns 418ns 0.304 0 0 2.15 KB
#6058 EncodeArgs net6.0 37μs 16.6ns 64.2ns 0.444 0 0 32.4 KB
#6058 EncodeArgs netcoreapp3.1 53.9μs 23.4ns 84.2ns 0.43 0 0 32.4 KB
#6058 EncodeArgs net472 65.9μs 18.4ns 68.8ns 5.15 0.066 0 32.5 KB
#6058 EncodeLegacyArgs net6.0 73.8μs 92.2ns 357ns 0 0 0 2.14 KB
#6058 EncodeLegacyArgs netcoreapp3.1 106μs 83.4ns 323ns 0 0 0 2.14 KB
#6058 EncodeLegacyArgs net472 152μs 78.8ns 305ns 0.303 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 185μs 326ns 1.26μs 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 198μs 153ns 553ns 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 210μs 235ns 910ns 0.313 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 122μs 72.4ns 280ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 130μs 96.5ns 361ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 138μs 28.7ns 111ns 0.207 0 0 1.48 KB
#6058 RunWafRealisticBenchmark net6.0 185μs 65.7ns 254ns 0 0 0 2.44 KB
#6058 RunWafRealisticBenchmark netcoreapp3.1 196μs 112ns 433ns 0 0 0 2.39 KB
#6058 RunWafRealisticBenchmark net472 210μs 286ns 1.14μs 0.314 0 0 2.46 KB
#6058 RunWafRealisticBenchmarkWithAttack net6.0 123μs 172ns 668ns 0 0 0 1.47 KB
#6058 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 179ns 693ns 0 0 0 1.46 KB
#6058 RunWafRealisticBenchmarkWithAttack net472 140μs 15.4ns 53.5ns 0.21 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6058

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 58.03 KB 59.09 KB 1.06 KB 1.82%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 254.71 KB 256.34 KB 1.62 KB 0.64%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 60.5μs 759ns 7.55μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 59.4μs 731ns 7.17μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 36.9μs 98.3ns 368ns 0 0 0 58.03 KB
master StringConcatAspectBenchmark net6.0 305μs 1.59μs 9.77μs 0 0 0 254.71 KB
master StringConcatAspectBenchmark netcoreapp3.1 344μs 1.56μs 9.35μs 0 0 0 254.92 KB
master StringConcatAspectBenchmark net472 268μs 5.22μs 50.9μs 0 0 0 278.53 KB
#6058 StringConcatBenchmark net6.0 58μs 865ns 8.48μs 0 0 0 43.44 KB
#6058 StringConcatBenchmark netcoreapp3.1 54.6μs 209ns 752ns 0 0 0 42.64 KB
#6058 StringConcatBenchmark net472 38.4μs 170ns 613ns 0 0 0 59.09 KB
#6058 StringConcatAspectBenchmark net6.0 309μs 1.25μs 4.49μs 0 0 0 256.34 KB
#6058 StringConcatAspectBenchmark netcoreapp3.1 349μs 1.88μs 13.7μs 0 0 0 255.4 KB
#6058 StringConcatAspectBenchmark net472 276μs 6.42μs 62.5μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6058) (11.020M)   : 0, 11020405
    master (11.055M)   : 0, 11055201
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6058) (7.374M)   : 0, 7374279
    master (7.305M)   : 0, 7305302
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.719M)   : 0, 7718644

    section Manual
    master (11.176M)   : 0, 11175778

    section Manual + Automatic
    This PR (6058) (6.658M)   : 0, 6658363
    master (6.751M)   : 0, 6751175

    section DD_TRACE_ENABLED=0
    master (10.283M)   : 0, 10283286

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6058) (9.719M)   : 0, 9719426
    master (9.522M)   : 0, 9522238
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6058) (6.628M)   : 0, 6627929
    master (6.585M)   : 0, 6585219

    section Trace stats
    master (6.719M)   : 0, 6718679

    section Manual
    master (9.695M)   : 0, 9695137

    section Manual + Automatic
    This PR (6058) (6.162M)   : 0, 6162416
    master (6.146M)   : 0, 6146480

    section DD_TRACE_ENABLED=0
    master (8.894M)   : 0, 8893665

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6058) (10.043M)   : 0, 10042900
    master (9.812M)   : 0, 9812220
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6058) (6.388M)   : 0, 6387707
    master (6.417M)   : 0, 6417355
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.155M)   : 0, 7155211

    section Manual
    master (9.839M)   : 0, 9839498

    section Manual + Automatic
    This PR (6058) (5.909M)   : 0, 5909084
    master (5.948M)   : 0, 5948081

    section DD_TRACE_ENABLED=0
    master (9.155M)   : 0, 9154793

Loading

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6058 compared to master:

  • 3 benchmarks are faster, with geometric mean 1.138
  • 1 benchmarks are slower, with geometric mean 1.138
  • 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 7.89μs 45.5ns 350ns 0.0119 0.00397 0 5.42 KB
master StartStopWithChild netcoreapp3.1 9.71μs 51.7ns 283ns 0.0229 0.00917 0 5.62 KB
master StartStopWithChild net472 16.1μs 35.7ns 133ns 1.01 0.286 0.0875 6.06 KB
#6058 StartStopWithChild net6.0 7.77μs 41.6ns 220ns 0.0192 0.00767 0 5.42 KB
#6058 StartStopWithChild netcoreapp3.1 9.82μs 55.7ns 382ns 0.0194 0.0097 0 5.62 KB
#6058 StartStopWithChild net472 16.5μs 80.9ns 353ns 1.04 0.328 0.0961 6.07 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 454μs 360ns 1.35μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 404ns 1.57μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 833μs 360ns 1.35μs 0.417 0 0 3.3 KB
#6058 WriteAndFlushEnrichedTraces net6.0 447μs 371ns 1.44μs 0 0 0 2.7 KB
#6058 WriteAndFlushEnrichedTraces netcoreapp3.1 617μs 390ns 1.51μs 0 0 0 2.7 KB
#6058 WriteAndFlushEnrichedTraces net472 832μs 387ns 1.5μs 0.414 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 200μs 1.15μs 9.48μs 0.195 0 0 18.45 KB
master SendRequest netcoreapp3.1 221μs 1.27μs 10.2μs 0.208 0 0 20.61 KB
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#6058 SendRequest net6.0 200μs 1.12μs 7.36μs 0.187 0 0 18.45 KB
#6058 SendRequest netcoreapp3.1 218μs 1.17μs 6.18μs 0.21 0 0 20.61 KB
#6058 SendRequest net472 0.00031ns 0.000241ns 0.000902ns 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 556μs 2.82μs 12.6μs 0.558 0 0 41.6 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 689μs 3.84μs 23.7μs 0.332 0 0 41.76 KB
master WriteAndFlushEnrichedTraces net472 846μs 4.11μs 17.4μs 8.52 2.44 0.406 53.29 KB
#6058 WriteAndFlushEnrichedTraces net6.0 566μs 3.26μs 25.1μs 0.558 0 0 41.4 KB
#6058 WriteAndFlushEnrichedTraces netcoreapp3.1 665μs 1.95μs 6.76μs 0.336 0 0 41.74 KB
#6058 WriteAndFlushEnrichedTraces net472 873μs 3.37μs 12.6μs 8.08 2.55 0.425 53.29 KB
Benchmarks.Trace.DbCommandBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6058

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 1.122 1,344.66 1,198.12

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.35μs 1.67ns 6.49ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.71μs 1.28ns 4.94ns 0.0136 0 0 1.02 KB
master ExecuteNonQuery net472 2.08μs 2ns 7.74ns 0.156 0 0 987 B
#6058 ExecuteNonQuery net6.0 1.2μs 1.22ns 4.74ns 0.0144 0 0 1.02 KB
#6058 ExecuteNonQuery netcoreapp3.1 1.78μs 2.26ns 8.74ns 0.0137 0 0 1.02 KB
#6058 ExecuteNonQuery net472 2.03μs 2.15ns 8.33ns 0.157 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.19μs 4.78ns 18.5ns 0.0136 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.58μs 0.931ns 3.49ns 0.0134 0 0 976 B
master CallElasticsearch net472 2.43μs 3.46ns 13.4ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.22μs 0.629ns 2.44ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.67μs 0.721ns 2.6ns 0.0143 0 0 1.02 KB
master CallElasticsearchAsync net472 2.65μs 4.27ns 15.4ns 0.166 0 0 1.05 KB
#6058 CallElasticsearch net6.0 1.16μs 0.446ns 1.73ns 0.0134 0 0 976 B
#6058 CallElasticsearch netcoreapp3.1 1.54μs 2.88ns 10.4ns 0.0133 0 0 976 B
#6058 CallElasticsearch net472 2.43μs 1.48ns 5.71ns 0.157 0 0 995 B
#6058 CallElasticsearchAsync net6.0 1.23μs 0.861ns 3.34ns 0.0135 0 0 952 B
#6058 CallElasticsearchAsync netcoreapp3.1 1.64μs 0.892ns 3.34ns 0.0132 0 0 1.02 KB
#6058 CallElasticsearchAsync net472 2.58μs 2.23ns 8.04ns 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.31μs 0.646ns 2.5ns 0.0138 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.64μs 1.84ns 6.9ns 0.0125 0 0 952 B
master ExecuteAsync net472 1.76μs 1.34ns 5.2ns 0.145 0 0 915 B
#6058 ExecuteAsync net6.0 1.35μs 1.33ns 4.98ns 0.013 0 0 952 B
#6058 ExecuteAsync netcoreapp3.1 1.59μs 0.595ns 2.23ns 0.0127 0 0 952 B
#6058 ExecuteAsync net472 1.77μs 0.856ns 3.2ns 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.18μs 1.63ns 6.09ns 0.0314 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.16μs 1.86ns 7.19ns 0.036 0 0 2.76 KB
master SendAsync net472 7.81μs 3.57ns 13.8ns 0.498 0 0 3.15 KB
#6058 SendAsync net6.0 4.12μs 1.43ns 5.35ns 0.0306 0 0 2.22 KB
#6058 SendAsync netcoreapp3.1 5.15μs 1.74ns 6.51ns 0.0361 0 0 2.76 KB
#6058 SendAsync net472 7.78μs 4.27ns 16.5ns 0.497 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6058

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.138 1,453.97 1,655.30

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.45μs 0.806ns 3.02ns 0.0227 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.23μs 4.13ns 16ns 0.0224 0 0 1.64 KB
master EnrichedLog net472 2.61μs 0.836ns 3.24ns 0.249 0 0 1.57 KB
#6058 EnrichedLog net6.0 1.66μs 1.29ns 4.48ns 0.0229 0 0 1.64 KB
#6058 EnrichedLog netcoreapp3.1 2.36μs 1.15ns 4.32ns 0.0223 0 0 1.64 KB
#6058 EnrichedLog net472 2.5μs 0.814ns 3.15ns 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 116μs 154ns 577ns 0.0574 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 118μs 175ns 656ns 0 0 0 4.28 KB
master EnrichedLog net472 147μs 201ns 777ns 0.661 0.22 0 4.46 KB
#6058 EnrichedLog net6.0 113μs 161ns 625ns 0.0562 0 0 4.28 KB
#6058 EnrichedLog netcoreapp3.1 119μs 289ns 1.08μs 0 0 0 4.28 KB
#6058 EnrichedLog net472 144μs 58.8ns 204ns 0.649 0.216 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 3.13μs 1.18ns 4.56ns 0.03 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.11μs 2.23ns 8.64ns 0.0288 0 0 2.2 KB
master EnrichedLog net472 4.76μs 8.33ns 28.8ns 0.32 0 0 2.02 KB
#6058 EnrichedLog net6.0 3.23μs 0.847ns 3.17ns 0.0307 0 0 2.2 KB
#6058 EnrichedLog netcoreapp3.1 4.29μs 1.66ns 6.43ns 0.028 0 0 2.2 KB
#6058 EnrichedLog net472 4.87μs 1.49ns 5.14ns 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.3μs 0.531ns 1.99ns 0.0162 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.82μs 0.8ns 2.99ns 0.0154 0 0 1.14 KB
master SendReceive net472 2.09μs 0.74ns 2.86ns 0.183 0.00105 0 1.16 KB
#6058 SendReceive net6.0 1.39μs 0.997ns 3.86ns 0.0162 0 0 1.14 KB
#6058 SendReceive netcoreapp3.1 1.7μs 1.23ns 4.6ns 0.0153 0 0 1.14 KB
#6058 SendReceive net472 2.02μs 0.895ns 3.47ns 0.183 0.00101 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.63μs 0.956ns 3.7ns 0.0224 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 4.04μs 2.76ns 9.97ns 0.0222 0 0 1.65 KB
master EnrichedLog net472 4.43μs 3.09ns 12ns 0.323 0 0 2.04 KB
#6058 EnrichedLog net6.0 2.76μs 4.35ns 16.9ns 0.0221 0 0 1.6 KB
#6058 EnrichedLog netcoreapp3.1 3.97μs 2.21ns 8.56ns 0.0218 0 0 1.65 KB
#6058 EnrichedLog net472 4.38μs 19.1ns 73.9ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6058

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.163 769.15 661.62

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 399ns 0.134ns 0.519ns 0.00809 0 0 576 B
master StartFinishSpan netcoreapp3.1 570ns 0.274ns 1.02ns 0.00767 0 0 576 B
master StartFinishSpan net472 676ns 0.996ns 3.73ns 0.0916 0 0 578 B
master StartFinishScope net6.0 479ns 0.234ns 0.907ns 0.00964 0 0 696 B
master StartFinishScope netcoreapp3.1 769ns 0.337ns 1.26ns 0.00933 0 0 696 B
master StartFinishScope net472 839ns 0.644ns 2.49ns 0.104 0 0 658 B
#6058 StartFinishSpan net6.0 406ns 0.187ns 0.649ns 0.00818 0 0 576 B
#6058 StartFinishSpan netcoreapp3.1 538ns 0.191ns 0.713ns 0.00782 0 0 576 B
#6058 StartFinishSpan net472 658ns 0.47ns 1.82ns 0.0917 0 0 578 B
#6058 StartFinishScope net6.0 477ns 0.17ns 0.635ns 0.00982 0 0 696 B
#6058 StartFinishScope netcoreapp3.1 662ns 0.257ns 0.962ns 0.00927 0 0 696 B
#6058 StartFinishScope net472 844ns 0.771ns 2.99ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6058

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.130 669.99 592.86

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 670ns 0.577ns 2.23ns 0.00973 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 923ns 0.721ns 2.7ns 0.00925 0 0 696 B
master RunOnMethodBegin net472 1.14μs 0.929ns 3.6ns 0.105 0 0 658 B
#6058 RunOnMethodBegin net6.0 593ns 0.274ns 1.06ns 0.00988 0 0 696 B
#6058 RunOnMethodBegin netcoreapp3.1 958ns 0.781ns 2.92ns 0.00957 0 0 696 B
#6058 RunOnMethodBegin net472 1.09μs 0.515ns 1.99ns 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants