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] unknown type to encode: log debug instead of warning #4809

Merged
merged 3 commits into from
Nov 8, 2023

Conversation

anna-git
Copy link
Contributor

@anna-git anna-git commented Nov 3, 2023

Summary of changes

Change warning to debug level for asm log, when unexpected type reach the Encoder.cs

Reason for change

Some unknown types still make it here, we dont want to flood the logs, so make it a debug one for now, before adding a potential metric
Refer to #3553 for same issue

Implementation details

Test coverage

Other details

@anna-git anna-git requested a review from a team as a code owner November 3, 2023 09:31
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this (tiny suggestion)

tracer/src/Datadog.Trace/AppSec/Waf/Encoder.cs Outdated Show resolved Hide resolved
Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 3, 2023

Datadog Report

Branch report: anna/log-debug-unknown-type
Commit report: 7cdc053

❄️ dd-trace-dotnet: 0 Failed, 1 New Flaky, 297832 Passed, 948 Skipped, 54m 13.8s Wall Time

New Flaky Tests (1)

  • TransportsWorkCorrectly - Datadog.Trace.Tests.DataStreamsMonitoring.DataStreamsMonitoringTransportTests

@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 (4809) - mean (72ms)  : 63, 80
     .   : milestone, 72,
    master - mean (71ms)  : 63, 78
     .   : milestone, 71,

    section CallTarget+Inlining+NGEN
    This PR (4809) - mean (1,004ms)  : 982, 1025
     .   : milestone, 1004,
    master - mean (998ms)  : 979, 1017
     .   : milestone, 998,

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

    section CallTarget+Inlining+NGEN
    This PR (4809) - mean (687ms)  : 668, 706
     .   : milestone, 687,
    master - mean (686ms)  : 669, 703
     .   : milestone, 686,

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

    section CallTarget+Inlining+NGEN
    This PR (4809) - mean (659ms)  : 634, 684
     .   : milestone, 659,
    master - mean (659ms)  : 634, 683
     .   : milestone, 659,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4809) - mean (187ms)  : 185, 189
     .   : milestone, 187,
    master - mean (187ms)  : 184, 189
     .   : milestone, 187,

    section CallTarget+Inlining+NGEN
    This PR (4809) - mean (1,131ms)  : 1114, 1148
     .   : milestone, 1131,
    master - mean (1,127ms)  : 1107, 1148
     .   : milestone, 1127,

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

    section CallTarget+Inlining+NGEN
    This PR (4809) - mean (1,097ms)  : 1076, 1118
     .   : milestone, 1097,
    master - mean (1,098ms)  : 1077, 1119
     .   : milestone, 1098,

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

    section CallTarget+Inlining+NGEN
    This PR (4809) - mean (1,060ms)  : 1040, 1080
     .   : milestone, 1060,
    master - mean (1,064ms)  : 1041, 1088
     .   : milestone, 1064,

Loading

@andrewlock
Copy link
Member

Throughput/Crank Report:zap:

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 (4809) (11.185M)   : 0, 11184515
    master (11.146M)   : 0, 11146339
    benchmarks/2.38.0 (11.867M)   : 0, 11866956
    benchmarks/2.9.0 (10.921M)   : 0, 10920504

    section Automatic
    This PR (4809) (7.585M)   : 0, 7585465
    master (7.676M)   : 0, 7676292
    benchmarks/2.38.0 (8.176M)   : 0, 8175636
    benchmarks/2.9.0 (7.899M)   : 0, 7898906

    section Trace stats
    This PR (4809) (7.875M)   : 0, 7875436
    master (7.834M)   : 0, 7834142
    benchmarks/2.38.0 (8.450M)   : 0, 8450370

    section Manual
    This PR (4809) (9.475M)   : 0, 9475269
    master (9.824M)   : 0, 9824352
    benchmarks/2.38.0 (10.334M)   : 0, 10334368

    section Manual + Automatic
    This PR (4809) (7.135M)   : 0, 7135020
    master (7.442M)   : 0, 7442064
    benchmarks/2.38.0 (7.750M)   : 0, 7750484

    section Version Conflict
    This PR (4809) (6.560M)   : 0, 6559778
    master (6.867M)   : 0, 6867250
    benchmarks/2.38.0 (7.137M)   : 0, 7136691

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4809) (9.365M)   : 0, 9365429
    benchmarks/2.38.0 (9.548M)   : 0, 9548121
    benchmarks/2.9.0 (9.696M)   : 0, 9695973

    section Automatic
    This PR (4809) (6.730M)   : 0, 6730236
    benchmarks/2.38.0 (6.747M)   : 0, 6747227

    section Trace stats
    This PR (4809) (6.818M)   : 0, 6818242
    benchmarks/2.38.0 (6.815M)   : 0, 6814846

    section Manual
    This PR (4809) (8.338M)   : 0, 8337916
    benchmarks/2.38.0 (8.263M)   : 0, 8263131

    section Manual + Automatic
    This PR (4809) (6.264M)   : 0, 6263533
    benchmarks/2.38.0 (6.275M)   : 0, 6275411

    section Version Conflict
    This PR (4809) (5.850M)   : 0, 5849616
    benchmarks/2.38.0 (5.670M)   : 0, 5669744

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4809) (9.488M)   : 0, 9487746
    master (9.316M)   : 0, 9316324
    benchmarks/2.38.0 (9.007M)   : 0, 9007066
    benchmarks/2.9.0 (9.586M)   : 0, 9585650

    section Automatic
    This PR (4809) (6.803M)   : 0, 6802524
    master (6.579M)   : 0, 6579069
    benchmarks/2.38.0 (6.423M)   : 0, 6422756
    benchmarks/2.9.0 (7.033M)   : 0, 7033199

    section Trace stats
    This PR (4809) (6.897M)   : 0, 6897240
    master (6.885M)   : 0, 6884865
    benchmarks/2.38.0 (6.721M)   : 0, 6720838

    section Manual
    This PR (4809) (8.349M)   : 0, 8348677
    master (8.353M)   : 0, 8353411
    benchmarks/2.38.0 (7.977M)   : 0, 7977494

    section Manual + Automatic
    This PR (4809) (6.408M)   : 0, 6407702
    master (6.371M)   : 0, 6370964
    benchmarks/2.38.0 (6.349M)   : 0, 6349066

    section Version Conflict
    This PR (4809) (5.819M)   : 0, 5819156
    master (5.871M)   : 0, 5871429
    benchmarks/2.38.0 (5.682M)   : 0, 5681654

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (4809) (7.825M)   : 0, 7825024
    master (7.566M)   : 0, 7565721
    benchmarks/2.38.0 (7.578M)   : 0, 7577544
    benchmarks/2.9.0 (8.040M)   : 0, 8039615

    section No attack
    This PR (4809) (2.187M)   : 0, 2187395
    master (2.185M)   : 0, 2184596
    benchmarks/2.38.0 (2.184M)   : 0, 2184279
    benchmarks/2.9.0 (3.290M)   : 0, 3289982

    section Attack
    This PR (4809) (1.716M)   : 0, 1716117
    master (1.726M)   : 0, 1726196
    benchmarks/2.38.0 (1.711M)   : 0, 1710542
    benchmarks/2.9.0 (2.581M)   : 0, 2581167

    section Blocking
    This PR (4809) (3.442M)   : 0, 3442312
    master (3.502M)   : 0, 3502052
    benchmarks/2.38.0 (3.486M)   : 0, 3486124

    section IAST default
    This PR (4809) (6.931M)   : 0, 6931013
    master (6.830M)   : 0, 6829896

    section IAST full
    This PR (4809) (6.169M)   : 0, 6168967
    master (6.164M)   : 0, 6164111

    section Base vuln
    This PR (4809) (0.942M)   : 0, 942164
    master (0.940M)   : 0, 940172

    section IAST vuln
    This PR (4809) (0.928M)   : 0, 928085
    master (0.930M)   : 0, 930048

Loading

@andrewlock
Copy link
Member

Benchmarks Report 🐌

Benchmarks for #4809 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.138
  • 2 benchmarks are slower, with geometric mean 1.143
  • 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.12μs 38.2ns 153ns 0.0159 0.00795 0 7.29 KB
master StartStopWithChild netcoreapp3.1 10.2μs 56.4ns 348ns 0.0308 0.0103 0 7.39 KB
master StartStopWithChild net472 15.5μs 73.4ns 284ns 1.27 0.299 0.0945 7.67 KB
#4809 StartStopWithChild net6.0 8.05μs 44.5ns 275ns 0.025 0.00833 0 7.29 KB
#4809 StartStopWithChild netcoreapp3.1 10.5μs 55.6ns 278ns 0.0301 0.015 0 7.38 KB
#4809 StartStopWithChild net472 15.8μs 40.5ns 151ns 1.27 0.293 0.0872 7.66 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 468μs 226ns 877ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 619μs 276ns 955ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 805μs 394ns 1.47μs 0.403 0 0 3.3 KB
#4809 WriteAndFlushEnrichedTraces net6.0 485μs 445ns 1.72μs 0 0 0 2.7 KB
#4809 WriteAndFlushEnrichedTraces netcoreapp3.1 633μs 471ns 1.76μs 0 0 0 2.7 KB
#4809 WriteAndFlushEnrichedTraces net472 801μs 535ns 1.93μs 0.398 0 0 3.3 KB
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 44μs 33.2ns 128ns 0.0222 0 0 2.03 KB
master AllCycleSimpleBody netcoreapp3.1 45.8μs 77.6ns 310ns 0.0233 0 0 2.01 KB
master AllCycleSimpleBody net472 46.6μs 93.5ns 350ns 0.319 0 0 2.08 KB
master AllCycleMoreComplexBody net6.0 232μs 97.3ns 377ns 0.116 0 0 8.63 KB
master AllCycleMoreComplexBody netcoreapp3.1 235μs 187ns 725ns 0.118 0 0 8.52 KB
master AllCycleMoreComplexBody net472 240μs 125ns 485ns 1.32 0 0 8.7 KB
master ObjectExtractorSimpleBody net6.0 120ns 0.0958ns 0.371ns 0.00397 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 177ns 0.103ns 0.386ns 0.00367 0 0 272 B
master ObjectExtractorSimpleBody net472 145ns 0.144ns 0.559ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.01μs 1.74ns 6.52ns 0.0544 0 0 3.88 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.14μs 1.93ns 7.23ns 0.0499 0 0 3.78 KB
master ObjectExtractorMoreComplexBody net472 4.17μs 2.94ns 11.4ns 0.618 0.00624 0 3.89 KB
#4809 AllCycleSimpleBody net6.0 43.4μs 14.4ns 52ns 0.0222 0 0 2.03 KB
#4809 AllCycleSimpleBody netcoreapp3.1 45.9μs 22.7ns 84.8ns 0.0224 0 0 2.01 KB
#4809 AllCycleSimpleBody net472 46.1μs 14.6ns 54.5ns 0.321 0 0 2.08 KB
#4809 AllCycleMoreComplexBody net6.0 231μs 213ns 825ns 0.116 0 0 8.63 KB
#4809 AllCycleMoreComplexBody netcoreapp3.1 235μs 84.1ns 326ns 0 0 0 8.52 KB
#4809 AllCycleMoreComplexBody net472 239μs 92.7ns 359ns 1.31 0 0 8.7 KB
#4809 ObjectExtractorSimpleBody net6.0 131ns 0.0933ns 0.349ns 0.00392 0 0 280 B
#4809 ObjectExtractorSimpleBody netcoreapp3.1 184ns 0.282ns 1.09ns 0.00371 0 0 272 B
#4809 ObjectExtractorSimpleBody net472 149ns 0.178ns 0.667ns 0.0446 0 0 281 B
#4809 ObjectExtractorMoreComplexBody net6.0 3.04μs 1.38ns 5.34ns 0.0548 0 0 3.88 KB
#4809 ObjectExtractorMoreComplexBody netcoreapp3.1 4.3μs 2.37ns 9.18ns 0.0515 0 0 3.78 KB
#4809 ObjectExtractorMoreComplexBody net472 4.16μs 3.77ns 14.1ns 0.617 0.00623 0 3.89 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 RunWaf(args=NestedMap (10)) net6.0 12.5μs 6.41ns 24ns 0.132 0 0 9.42 KB
master RunWaf(args=NestedMap (10)) netcoreapp3.1 19.5μs 6.84ns 25.6ns 0.127 0 0 9.42 KB
master RunWaf(args=NestedMap (10)) net472 28.2μs 14ns 52.6ns 1.5 0 0 9.48 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 75.2μs 33.1ns 120ns 0.226 0 0 15.77 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 85.7μs 232ns 835ns 0.171 0 0 15.72 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 98.4μs 179ns 671ns 2.51 0 0 16.04 KB
master RunWaf(args=NestedMap (100)) net6.0 24.4μs 7.99ns 28.8ns 0.271 0 0 19.66 KB
master RunWaf(args=NestedMap (100)) netcoreapp3.1 37.9μs 19ns 68.4ns 0.284 0 0 20.42 KB
master RunWaf(args=NestedMap (100)) net472 57.2μs 35.1ns 131ns 3.27 0.0285 0 20.63 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 90.3μs 117ns 453ns 0.365 0 0 26.01 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 109μs 282ns 1.06μs 0.327 0 0 26.72 KB
master RunWafWithAttack(args=Neste(...)tack) [23]) net472 129μs 102ns 394ns 4.3 0.0642 0 27.19 KB
master RunWaf(args=NestedMap (20)) net6.0 23.9μs 7.49ns 27ns 0.273 0 0 19.4 KB
master RunWaf(args=NestedMap (20)) netcoreapp3.1 37.6μs 48.9ns 183ns 0.263 0 0 19.84 KB
master RunWaf(args=NestedMap (20)) net472 53.5μs 15.1ns 56.7ns 3.17 0.0533 0 20.04 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 92.2μs 33.4ns 129ns 0.325 0 0 25.74 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 109μs 176ns 682ns 0.328 0 0 26.14 KB
master RunWafWithAttack(args=Neste(...)tack) [22]) net472 129μs 115ns 443ns 4.18 0.0644 0 26.6 KB
#4809 RunWaf(args=NestedMap (10)) net6.0 12.6μs 6.27ns 23.4ns 0.133 0 0 9.42 KB
#4809 RunWaf(args=NestedMap (10)) netcoreapp3.1 19.7μs 7.89ns 28.5ns 0.128 0 0 9.42 KB
#4809 RunWaf(args=NestedMap (10)) net472 28.7μs 12ns 45.1ns 1.49 0 0 9.48 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 77.2μs 54ns 209ns 0.19 0 0 15.77 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 85.2μs 220ns 852ns 0.21 0 0 15.72 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [22]) net472 97.7μs 188ns 727ns 2.51 0 0 16.04 KB
#4809 RunWaf(args=NestedMap (100)) net6.0 23.8μs 6.87ns 26.6ns 0.274 0 0 19.66 KB
#4809 RunWaf(args=NestedMap (100)) netcoreapp3.1 38.1μs 19.8ns 76.7ns 0.266 0 0 20.42 KB
#4809 RunWaf(args=NestedMap (100)) net472 54.9μs 20.5ns 76.5ns 3.26 0.0274 0 20.63 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [23]) net6.0 92μs 24.9ns 89.7ns 0.322 0 0 26.01 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [23]) netcoreapp3.1 108μs 111ns 416ns 0.326 0 0 26.72 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [23]) net472 132μs 46.2ns 167ns 4.27 0.0647 0 27.19 KB
#4809 RunWaf(args=NestedMap (20)) net6.0 24.4μs 17.6ns 68.3ns 0.269 0 0 19.4 KB
#4809 RunWaf(args=NestedMap (20)) netcoreapp3.1 37.7μs 26.9ns 101ns 0.264 0 0 19.84 KB
#4809 RunWaf(args=NestedMap (20)) net472 54.1μs 30.4ns 110ns 3.18 0.0539 0 20.04 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [22]) net6.0 91.8μs 54.2ns 210ns 0.32 0 0 25.74 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [22]) netcoreapp3.1 107μs 189ns 708ns 0.319 0 0 26.14 KB
#4809 RunWafWithAttack(args=Neste(...)tack) [22]) net472 130μs 257ns 995ns 4.2 0.0646 0 26.6 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 169μs 146ns 567ns 0.169 0 0 18.04 KB
master SendRequest netcoreapp3.1 191μs 374ns 1.45μs 0.188 0 0 20.2 KB
master SendRequest net472 0.000828ns 0.000236ns 0.000916ns 0 0 0 0 b
#4809 SendRequest net6.0 167μs 90.1ns 337ns 0.168 0 0 18.04 KB
#4809 SendRequest netcoreapp3.1 187μs 336ns 1.3μs 0.143 0 0 20.2 KB
#4809 SendRequest net472 0.00115ns 0.000404ns 0.00156ns 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 538μs 1.51μs 5.86μs 0.532 0 0 41.76 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 662μs 1.44μs 5.57μs 0.329 0 0 41.74 KB
master WriteAndFlushEnrichedTraces net472 851μs 4.01μs 15.5μs 8.25 2.6 0.434 53.25 KB
#4809 WriteAndFlushEnrichedTraces net6.0 557μs 932ns 3.61μs 0.568 0 0 41.63 KB
#4809 WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 1.64μs 6.36μs 0.332 0 0 41.8 KB
#4809 WriteAndFlushEnrichedTraces net472 823μs 2.33μs 8.72μs 8.17 2.45 0.408 53.22 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.08μs 1.31ns 5.08ns 0.0107 0 0 768 B
master ExecuteNonQuery netcoreapp3.1 1.39μs 0.453ns 1.7ns 0.0104 0 0 768 B
master ExecuteNonQuery net472 1.65μs 2.29ns 8.85ns 0.115 0 0 730 B
#4809 ExecuteNonQuery net6.0 977ns 0.606ns 2.35ns 0.0108 0 0 768 B
#4809 ExecuteNonQuery netcoreapp3.1 1.29μs 0.272ns 1.02ns 0.0103 0 0 768 B
#4809 ExecuteNonQuery net472 1.67μs 2.54ns 9.51ns 0.115 0 0 730 B
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4809

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.144 1,334.94 1,166.54

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.17μs 0.542ns 2.03ns 0.0133 0 0 936 B
master CallElasticsearch netcoreapp3.1 1.45μs 0.696ns 2.41ns 0.0125 0 0 936 B
master CallElasticsearch net472 2.36μs 0.476ns 1.84ns 0.152 0 0 955 B
master CallElasticsearchAsync net6.0 1.34μs 0.453ns 1.69ns 0.0127 0 0 912 B
master CallElasticsearchAsync netcoreapp3.1 1.42μs 1.81ns 6.79ns 0.0127 0 0 984 B
master CallElasticsearchAsync net472 2.45μs 2.57ns 9.94ns 0.16 0 0 1.01 KB
#4809 CallElasticsearch net6.0 1.15μs 0.386ns 1.44ns 0.0133 0 0 936 B
#4809 CallElasticsearch netcoreapp3.1 1.39μs 1.08ns 4.04ns 0.0125 0 0 936 B
#4809 CallElasticsearch net472 2.37μs 0.702ns 2.72ns 0.151 0 0 955 B
#4809 CallElasticsearchAsync net6.0 1.17μs 0.377ns 1.41ns 0.0129 0 0 912 B
#4809 CallElasticsearchAsync netcoreapp3.1 1.41μs 0.835ns 3.01ns 0.0133 0 0 984 B
#4809 CallElasticsearchAsync net472 2.55μs 1.6ns 6.21ns 0.16 0 0 1.01 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.2μs 0.736ns 2.85ns 0.0126 0 0 912 B
master ExecuteAsync netcoreapp3.1 1.55μs 0.45ns 1.68ns 0.0124 0 0 912 B
master ExecuteAsync net472 1.72μs 1.43ns 5.53ns 0.139 0 0 875 B
#4809 ExecuteAsync net6.0 1.33μs 1.33ns 5.14ns 0.0124 0 0 912 B
#4809 ExecuteAsync netcoreapp3.1 1.49μs 0.664ns 2.57ns 0.0126 0 0 912 B
#4809 ExecuteAsync net472 1.74μs 1.3ns 5.04ns 0.138 0 0 875 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 3.7μs 1.27ns 4.74ns 0.026 0 0 1.9 KB
master SendAsync netcoreapp3.1 4.45μs 2.37ns 8.87ns 0.0333 0 0 2.43 KB
master SendAsync net472 7.13μs 3.16ns 12.2ns 0.472 0 0 2.99 KB
#4809 SendAsync net6.0 3.87μs 2.47ns 9.24ns 0.0253 0 0 1.9 KB
#4809 SendAsync netcoreapp3.1 4.4μs 3.04ns 11.8ns 0.0333 0 0 2.43 KB
#4809 SendAsync net472 7.17μs 8.96ns 34.7ns 0.472 0 0 2.99 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.3μs 0.483ns 1.81ns 0.0218 0 0 1.57 KB
master EnrichedLog netcoreapp3.1 1.97μs 2.68ns 10ns 0.0212 0 0 1.57 KB
master EnrichedLog net472 2.31μs 1.14ns 4.27ns 0.237 0 0 1.49 KB
#4809 EnrichedLog net6.0 1.36μs 0.477ns 1.72ns 0.0222 0 0 1.57 KB
#4809 EnrichedLog netcoreapp3.1 2.04μs 1.47ns 5.71ns 0.0213 0 0 1.57 KB
#4809 EnrichedLog net472 2.28μs 2.17ns 8.13ns 0.237 0 0 1.49 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 113μs 82.3ns 319ns 0.0569 0 0 4.21 KB
master EnrichedLog netcoreapp3.1 117μs 178ns 688ns 0.0582 0 0 4.21 KB
master EnrichedLog net472 146μs 53.6ns 201ns 0.656 0.219 0 4.38 KB
#4809 EnrichedLog net6.0 113μs 63.7ns 247ns 0.0566 0 0 4.21 KB
#4809 EnrichedLog netcoreapp3.1 117μs 128ns 479ns 0.0587 0 0 4.21 KB
#4809 EnrichedLog net472 146μs 65.3ns 244ns 0.656 0.219 0 4.38 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.92μs 0.773ns 2.89ns 0.0305 0 0 2.13 KB
master EnrichedLog netcoreapp3.1 3.82μs 1.69ns 6.55ns 0.0286 0 0 2.13 KB
master EnrichedLog net472 4.49μs 1.79ns 6.69ns 0.307 0 0 1.93 KB
#4809 EnrichedLog net6.0 2.96μs 1.35ns 5.06ns 0.0292 0 0 2.13 KB
#4809 EnrichedLog netcoreapp3.1 3.9μs 0.817ns 3.16ns 0.0273 0 0 2.13 KB
#4809 EnrichedLog net472 4.5μs 1.29ns 4.98ns 0.305 0 0 1.93 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.36μs 0.644ns 2.41ns 0.0156 0 0 1.1 KB
master SendReceive netcoreapp3.1 1.62μs 0.599ns 2.32ns 0.0147 0 0 1.1 KB
master SendReceive net472 2.05μs 1.99ns 7.18ns 0.177 0 0 1.12 KB
#4809 SendReceive net6.0 1.29μs 0.405ns 1.57ns 0.0155 0 0 1.1 KB
#4809 SendReceive netcoreapp3.1 1.68μs 0.633ns 2.45ns 0.015 0 0 1.1 KB
#4809 SendReceive net472 2.02μs 3.1ns 11.6ns 0.176 0 0 1.12 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.57μs 1.36ns 5.26ns 0.0206 0 0 1.53 KB
master EnrichedLog netcoreapp3.1 3.46μs 1.43ns 5.53ns 0.0206 0 0 1.58 KB
master EnrichedLog net472 4.1μs 2.13ns 8.25ns 0.31 0 0 1.96 KB
#4809 EnrichedLog net6.0 2.66μs 2.17ns 8.39ns 0.0212 0 0 1.53 KB
#4809 EnrichedLog netcoreapp3.1 3.67μs 5.27ns 20.4ns 0.0202 0 0 1.58 KB
#4809 EnrichedLog net472 3.88μs 2.41ns 9.34ns 0.311 0 0 1.96 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #4809

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 1.170 803.60 940.28
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.116 672.85 750.79

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 442ns 0.305ns 1.14ns 0.00759 0 0 536 B
master StartFinishSpan netcoreapp3.1 636ns 0.206ns 0.797ns 0.00731 0 0 536 B
master StartFinishSpan net472 734ns 0.149ns 0.558ns 0.0852 0 0 538 B
master StartFinishScope net6.0 507ns 0.112ns 0.435ns 0.00927 0 0 656 B
master StartFinishScope netcoreapp3.1 673ns 0.17ns 0.613ns 0.00874 0 0 656 B
master StartFinishScope net472 804ns 0.71ns 2.75ns 0.098 0 0 618 B
#4809 StartFinishSpan net6.0 458ns 0.126ns 0.488ns 0.00747 0 0 536 B
#4809 StartFinishSpan netcoreapp3.1 620ns 0.149ns 0.556ns 0.00747 0 0 536 B
#4809 StartFinishSpan net472 686ns 0.145ns 0.563ns 0.0854 0 0 538 B
#4809 StartFinishScope net6.0 533ns 0.135ns 0.504ns 0.0092 0 0 656 B
#4809 StartFinishScope netcoreapp3.1 751ns 0.182ns 0.705ns 0.00866 0 0 656 B
#4809 StartFinishScope net472 940ns 0.314ns 1.22ns 0.0978 0 0 618 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4809

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.132 612.61 541.34

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 612ns 0.365ns 1.41ns 0.00923 0 0 656 B
master RunOnMethodBegin netcoreapp3.1 849ns 0.239ns 0.925ns 0.00888 0 0 656 B
master RunOnMethodBegin net472 981ns 0.452ns 1.75ns 0.0977 0 0 618 B
#4809 RunOnMethodBegin net6.0 541ns 0.228ns 0.884ns 0.00923 0 0 656 B
#4809 RunOnMethodBegin netcoreapp3.1 817ns 2.29ns 8.87ns 0.0086 0 0 656 B
#4809 RunOnMethodBegin net472 1.01μs 0.266ns 1.03ns 0.098 0 0 618 B

@anna-git anna-git merged commit e11fdaf into master Nov 8, 2023
53 checks passed
@anna-git anna-git deleted the anna/log-debug-unknown-type branch November 8, 2023 10:22
@github-actions github-actions bot added this to the vNext milestone Nov 8, 2023
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.

4 participants