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] Fixes for DefaultInterpolatedStringHandler flakiness #6375

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

Conversation

e-n-0
Copy link
Member

@e-n-0 e-n-0 commented Nov 29, 2024

Summary of changes

  • Add Pop() method to the tainted objects map: to remove the tainted object from the map after we know that the stack pointer of the DefaultInterpolatedStringHandler will be invalid
  • Fix snapshot with new Pop()
  • Remove useless unsafe keyword
  • Add Conv_U() to the IL

Reason for change

Try to fix flaky tests for Implicit interpolated Iast strings tainting.

Test coverage

Added new unit tests for the new Pop() method (checking for its integrity and good returned results).

Other

Linked PR: #6379 (If this doesn't fix the flakiness)

@github-actions github-actions bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:asm labels Nov 29, 2024
@e-n-0 e-n-0 force-pushed the flavien/iast/interpolatedstring-tests branch from 6a1c526 to 458dbd5 Compare November 29, 2024 12:35
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 29, 2024

Datadog Report

Branch report: flavien/iast/interpolatedstring-tests
Commit report: 90a741b
Test service: dd-trace-dotnet

✅ 0 Failed, 446600 Passed, 2762 Skipped, 20h 0m 27.38s Total Time

@andrewlock
Copy link
Member

andrewlock commented Nov 29, 2024

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

    section CallTarget+Inlining+NGEN
    This PR (6375) - mean (978ms)  : 954, 1002
     .   : milestone, 978,
    master - mean (979ms)  : 960, 998
     .   : milestone, 979,

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

    section CallTarget+Inlining+NGEN
    This PR (6375) - mean (679ms)  : 662, 696
     .   : milestone, 679,
    master - mean (680ms)  : 666, 694
     .   : milestone, 680,

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

    section CallTarget+Inlining+NGEN
    This PR (6375) - mean (627ms)  : 608, 647
     .   : milestone, 627,
    master - mean (633ms)  : 617, 649
     .   : milestone, 633,

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

    section CallTarget+Inlining+NGEN
    This PR (6375) - mean (1,091ms)  : 1069, 1113
     .   : milestone, 1091,
    master - mean (1,093ms)  : 1066, 1121
     .   : milestone, 1093,

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

    section CallTarget+Inlining+NGEN
    This PR (6375) - mean (869ms)  : 840, 898
     .   : milestone, 869,
    master - mean (879ms)  : 850, 908
     .   : milestone, 879,

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

    section CallTarget+Inlining+NGEN
    This PR (6375) - mean (847ms)  : 817, 876
     .   : milestone, 847,
    master - mean (859ms)  : 829, 890
     .   : milestone, 859,

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 29, 2024

Benchmarks Report for appsec 🐌

Benchmarks for #6375 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 216μs 42.5ns 153ns 2.47 0 0 176.82 KB
master AllCycleSimpleBody netcoreapp3.1 319μs 132ns 475ns 2.42 0 0 184.27 KB
master AllCycleSimpleBody net472 279μs 121ns 451ns 33.3 2.51 0 210.04 KB
master AllCycleMoreComplexBody net6.0 225μs 154ns 556ns 2.58 0 0 180.33 KB
master AllCycleMoreComplexBody netcoreapp3.1 312μs 73ns 263ns 2.51 0 0 187.68 KB
master AllCycleMoreComplexBody net472 285μs 210ns 815ns 33.9 2.55 0 213.56 KB
master ObjectExtractorSimpleBody net6.0 147ns 0.117ns 0.439ns 0.00391 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 209ns 0.155ns 0.601ns 0.00364 0 0 272 B
master ObjectExtractorSimpleBody net472 212ns 0.175ns 0.678ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.03μs 1.99ns 7.45ns 0.0529 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.05μs 7.07ns 27.4ns 0.05 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 4.43μs 4.13ns 16ns 0.603 0.00663 0 3.8 KB
#6375 AllCycleSimpleBody net6.0 217μs 201ns 779ns 2.47 0 0 176.82 KB
#6375 AllCycleSimpleBody netcoreapp3.1 327μs 172ns 642ns 2.38 0 0 184.26 KB
#6375 AllCycleSimpleBody net472 283μs 433ns 1.68μs 33.3 2.51 0 210.04 KB
#6375 AllCycleMoreComplexBody net6.0 222μs 184ns 711ns 2.54 0 0 180.33 KB
#6375 AllCycleMoreComplexBody netcoreapp3.1 322μs 119ns 431ns 2.51 0 0 187.68 KB
#6375 AllCycleMoreComplexBody net472 302μs 1.63μs 9.65μs 33.8 2.48 0 213.56 KB
#6375 ObjectExtractorSimpleBody net6.0 140ns 0.137ns 0.53ns 0.00396 0 0 280 B
#6375 ObjectExtractorSimpleBody netcoreapp3.1 214ns 0.52ns 2.02ns 0.00373 0 0 272 B
#6375 ObjectExtractorSimpleBody net472 213ns 0.0891ns 0.333ns 0.0446 0 0 281 B
#6375 ObjectExtractorMoreComplexBody net6.0 3.04μs 1.74ns 6.26ns 0.0525 0 0 3.78 KB
#6375 ObjectExtractorMoreComplexBody netcoreapp3.1 3.85μs 1.72ns 6.44ns 0.0499 0 0 3.69 KB
#6375 ObjectExtractorMoreComplexBody net472 4.58μs 3.27ns 12.2ns 0.601 0.00461 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 40.1μs 14.9ns 53.9ns 0.463 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 53.8μs 26.8ns 96.6ns 0.428 0 0 32.4 KB
master EncodeArgs net472 66.5μs 32.2ns 116ns 5.15 0.0665 0 32.5 KB
master EncodeLegacyArgs net6.0 74.9μs 120ns 463ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 106μs 271ns 1.05μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 156μs 72.7ns 282ns 0.311 0 0 2.15 KB
#6375 EncodeArgs net6.0 37.6μs 19.7ns 76.2ns 0.469 0 0 32.4 KB
#6375 EncodeArgs netcoreapp3.1 54.8μs 38.6ns 150ns 0.434 0 0 32.4 KB
#6375 EncodeArgs net472 67.7μs 28.2ns 102ns 5.15 0.0678 0 32.5 KB
#6375 EncodeLegacyArgs net6.0 73.1μs 59.9ns 232ns 0 0 0 2.14 KB
#6375 EncodeLegacyArgs netcoreapp3.1 105μs 160ns 598ns 0 0 0 2.14 KB
#6375 EncodeLegacyArgs net472 157μs 95.3ns 357ns 0.314 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 182μs 232ns 900ns 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 196μs 282ns 1.09μs 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 207μs 68.8ns 257ns 0.31 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 122μs 63.7ns 238ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 130μs 159ns 595ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 140μs 127ns 492ns 0.21 0 0 1.48 KB
#6375 RunWafRealisticBenchmark net6.0 182μs 165ns 640ns 0 0 0 2.44 KB
#6375 RunWafRealisticBenchmark netcoreapp3.1 193μs 143ns 556ns 0 0 0 2.39 KB
#6375 RunWafRealisticBenchmark net472 209μs 72.7ns 262ns 0.314 0 0 2.46 KB
#6375 RunWafRealisticBenchmarkWithAttack net6.0 122μs 45.9ns 172ns 0 0 0 1.47 KB
#6375 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 166ns 641ns 0 0 0 1.46 KB
#6375 RunWafRealisticBenchmarkWithAttack net472 140μs 58.8ns 204ns 0.209 0 0 1.49 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6375

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 59.33 KB 62.09 KB 2.76 KB 4.65%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 255.16 KB 264.23 KB 9.07 KB 3.56%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 60.3μs 686ns 6.62μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 62.7μs 863ns 8.36μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.9μs 105ns 363ns 0 0 0 59.33 KB
master StringConcatAspectBenchmark net6.0 298μs 4.98μs 48.3μs 0 0 0 255.16 KB
master StringConcatAspectBenchmark netcoreapp3.1 345μs 1.97μs 14.8μs 0 0 0 253.82 KB
master StringConcatAspectBenchmark net472 289μs 6.11μs 59.5μs 0 0 0 278.53 KB
#6375 StringConcatBenchmark net6.0 61.2μs 717ns 7.14μs 0 0 0 43.44 KB
#6375 StringConcatBenchmark netcoreapp3.1 57.5μs 714ns 6.95μs 0 0 0 42.64 KB
#6375 StringConcatBenchmark net472 37.7μs 126ns 453ns 0 0 0 62.09 KB
#6375 StringConcatAspectBenchmark net6.0 319μs 1.74μs 9.35μs 0 0 0 264.23 KB
#6375 StringConcatAspectBenchmark netcoreapp3.1 347μs 1.93μs 18.1μs 0 0 0 252.9 KB
#6375 StringConcatAspectBenchmark net472 276μs 4.1μs 39.6μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

andrewlock commented Nov 29, 2024

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 (6375) (11.134M)   : 0, 11133878
    master (11.117M)   : 0, 11116942
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6375) (7.368M)   : 0, 7367855
    master (7.260M)   : 0, 7259731
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.668M)   : 0, 7667598

    section Manual
    master (11.257M)   : 0, 11257422

    section Manual + Automatic
    This PR (6375) (6.731M)   : 0, 6731350
    master (6.752M)   : 0, 6751591

    section DD_TRACE_ENABLED=0
    master (10.429M)   : 0, 10429279

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6375) (9.586M)   : 0, 9586428
    master (9.664M)   : 0, 9663866
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6375) (6.300M)   : 0, 6299526
    master (6.467M)   : 0, 6466720

    section Trace stats
    master (6.704M)   : 0, 6704260

    section Manual
    master (9.711M)   : 0, 9710712

    section Manual + Automatic
    This PR (6375) (5.923M)   : 0, 5922910
    master (5.991M)   : 0, 5991245

    section DD_TRACE_ENABLED=0
    master (8.961M)   : 0, 8961362

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6375) (10.214M)   : 0, 10213687
    master (10.283M)   : 0, 10282578
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6375) (6.424M)   : 0, 6424031
    master (6.605M)   : 0, 6605152
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.186M)   : 0, 7186132

    section Manual
    master (10.025M)   : 0, 10025447

    section Manual + Automatic
    This PR (6375) (5.661M)   : crit ,0, 5661446
    master (6.195M)   : 0, 6194775

    section DD_TRACE_ENABLED=0
    master (9.464M)   : 0, 9463946

Loading

@e-n-0 e-n-0 force-pushed the flavien/iast/interpolatedstring-tests branch from 458dbd5 to a1f55fb Compare November 29, 2024 17:31
@e-n-0 e-n-0 marked this pull request as ready for review November 29, 2024 17:34
@e-n-0 e-n-0 requested a review from a team as a code owner November 29, 2024 17:34
@andrewlock
Copy link
Member

andrewlock commented Nov 30, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6375 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.158
  • 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.18μs 46.2ns 330ns 0.0162 0.0081 0 5.62 KB
master StartStopWithChild netcoreapp3.1 10.3μs 47.9ns 220ns 0.0244 0.00976 0 5.8 KB
master StartStopWithChild net472 16.3μs 52ns 201ns 1.04 0.3 0.0972 6.21 KB
#6375 StartStopWithChild net6.0 8.09μs 46.3ns 340ns 0.0167 0.00836 0 5.61 KB
#6375 StartStopWithChild netcoreapp3.1 10.1μs 56.7ns 354ns 0.0247 0.00987 0 5.81 KB
#6375 StartStopWithChild net472 16μs 60.1ns 233ns 1.06 0.323 0.102 6.2 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 500μs 486ns 1.82μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 662μs 271ns 1.01μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 850μs 664ns 2.57μs 0.422 0 0 3.3 KB
#6375 WriteAndFlushEnrichedTraces net6.0 498μs 319ns 1.2μs 0 0 0 2.7 KB
#6375 WriteAndFlushEnrichedTraces netcoreapp3.1 675μs 422ns 1.63μs 0 0 0 2.7 KB
#6375 WriteAndFlushEnrichedTraces net472 841μs 576ns 2.16μs 0.419 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 152μs 1.05μs 10.3μs 0.15 0 0 14.47 KB
master SendRequest netcoreapp3.1 170μs 1.13μs 11.2μs 0.176 0 0 17.27 KB
master SendRequest net472 0.000897ns 0.000497ns 0.00179ns 0 0 0 0 b
#6375 SendRequest net6.0 153μs 917ns 9.17μs 0.147 0 0 14.47 KB
#6375 SendRequest netcoreapp3.1 168μs 971ns 8.18μs 0.164 0 0 17.27 KB
#6375 SendRequest net472 0.00175ns 0.000788ns 0.00295ns 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 587μs 3.16μs 16.7μs 0.568 0 0 41.81 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 699μs 3.76μs 19.5μs 0.336 0 0 41.73 KB
master WriteAndFlushEnrichedTraces net472 862μs 3.51μs 13.6μs 8.08 2.55 0.425 53.28 KB
#6375 WriteAndFlushEnrichedTraces net6.0 561μs 1.95μs 7.03μs 0.561 0 0 41.67 KB
#6375 WriteAndFlushEnrichedTraces netcoreapp3.1 679μs 3.04μs 12.5μs 0.368 0 0 41.83 KB
#6375 WriteAndFlushEnrichedTraces net472 895μs 4.09μs 15.8μs 8.09 2.25 0.45 53.23 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.35μs 2.23ns 8.65ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.77μs 1.4ns 5.42ns 0.0132 0 0 1.02 KB
master ExecuteNonQuery net472 2.13μs 1.66ns 6.44ns 0.156 0.00105 0 987 B
#6375 ExecuteNonQuery net6.0 1.33μs 1.62ns 6.07ns 0.014 0 0 1.02 KB
#6375 ExecuteNonQuery netcoreapp3.1 1.7μs 1.16ns 4.48ns 0.0136 0 0 1.02 KB
#6375 ExecuteNonQuery net472 2.08μs 2.34ns 9.06ns 0.157 0.00105 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.18μs 0.79ns 3.06ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.64μs 1.06ns 4.11ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.65μs 2.85ns 11ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.33μs 0.518ns 1.94ns 0.0133 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.64μs 0.619ns 2.32ns 0.0139 0 0 1.02 KB
master CallElasticsearchAsync net472 2.56μs 1.65ns 5.96ns 0.167 0 0 1.05 KB
#6375 CallElasticsearch net6.0 1.26μs 1.11ns 4.15ns 0.014 0 0 976 B
#6375 CallElasticsearch netcoreapp3.1 1.58μs 1.06ns 3.96ns 0.0127 0 0 976 B
#6375 CallElasticsearch net472 2.58μs 1.81ns 7.03ns 0.157 0 0 995 B
#6375 CallElasticsearchAsync net6.0 1.37μs 2.42ns 9.37ns 0.0133 0 0 952 B
#6375 CallElasticsearchAsync netcoreapp3.1 1.59μs 1.18ns 4.43ns 0.0134 0 0 1.02 KB
#6375 CallElasticsearchAsync net472 2.52μs 1.31ns 4.9ns 0.166 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.24μs 0.602ns 2.25ns 0.013 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.63μs 0.695ns 2.69ns 0.0129 0 0 952 B
master ExecuteAsync net472 1.83μs 1.12ns 4.34ns 0.145 0 0 915 B
#6375 ExecuteAsync net6.0 1.3μs 0.656ns 2.27ns 0.0134 0 0 952 B
#6375 ExecuteAsync netcoreapp3.1 1.65μs 1.97ns 7.62ns 0.0132 0 0 952 B
#6375 ExecuteAsync net472 1.81μs 1.23ns 4.75ns 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.16μs 1.93ns 7.47ns 0.0311 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.3μs 1.5ns 5.63ns 0.0371 0 0 2.85 KB
master SendAsync net472 7.26μs 1.63ns 6.12ns 0.493 0 0 3.12 KB
#6375 SendAsync net6.0 4.38μs 1.23ns 4.76ns 0.0327 0 0 2.31 KB
#6375 SendAsync netcoreapp3.1 5.3μs 2.63ns 9.83ns 0.0372 0 0 2.85 KB
#6375 SendAsync net472 7.34μs 1.84ns 6.89ns 0.494 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.59μs 1.24ns 4.65ns 0.0232 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.28μs 1.44ns 5.57ns 0.0227 0 0 1.64 KB
master EnrichedLog net472 2.6μs 1.31ns 4.89ns 0.249 0 0 1.57 KB
#6375 EnrichedLog net6.0 1.45μs 0.803ns 3.01ns 0.0231 0 0 1.64 KB
#6375 EnrichedLog netcoreapp3.1 2.35μs 2.03ns 7.88ns 0.022 0 0 1.64 KB
#6375 EnrichedLog net472 2.73μs 1.17ns 4.37ns 0.25 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 119μs 168ns 652ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 124μs 193ns 749ns 0 0 0 4.28 KB
master EnrichedLog net472 153μs 155ns 602ns 0.688 0.229 0 4.46 KB
#6375 EnrichedLog net6.0 120μs 192ns 744ns 0.0609 0 0 4.28 KB
#6375 EnrichedLog netcoreapp3.1 125μs 113ns 439ns 0 0 0 4.28 KB
#6375 EnrichedLog net472 153μs 118ns 456ns 0.685 0.228 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.08μs 0.993ns 3.85ns 0.0309 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.12μs 2.71ns 10.5ns 0.0288 0 0 2.2 KB
master EnrichedLog net472 4.88μs 1.23ns 4.62ns 0.319 0 0 2.02 KB
#6375 EnrichedLog net6.0 2.91μs 0.523ns 2.03ns 0.0305 0 0 2.2 KB
#6375 EnrichedLog netcoreapp3.1 4.01μs 2.7ns 10.5ns 0.0303 0 0 2.2 KB
#6375 EnrichedLog net472 4.82μs 1.68ns 6.5ns 0.32 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.37μs 0.621ns 2.32ns 0.0157 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.84μs 1.15ns 4.13ns 0.0157 0 0 1.14 KB
master SendReceive net472 2.1μs 1.48ns 5.73ns 0.183 0 0 1.16 KB
#6375 SendReceive net6.0 1.43μs 1.19ns 4.62ns 0.0157 0 0 1.14 KB
#6375 SendReceive netcoreapp3.1 1.78μs 0.725ns 2.71ns 0.0152 0 0 1.14 KB
#6375 SendReceive net472 2.11μs 2.03ns 7.86ns 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.85μs 1.51ns 5.85ns 0.0228 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.89μs 1.97ns 7.64ns 0.0214 0 0 1.65 KB
master EnrichedLog net472 4.33μs 3.09ns 11.6ns 0.323 0 0 2.04 KB
#6375 EnrichedLog net6.0 2.89μs 0.839ns 3.14ns 0.0218 0 0 1.6 KB
#6375 EnrichedLog netcoreapp3.1 3.87μs 0.992ns 3.84ns 0.021 0 0 1.65 KB
#6375 EnrichedLog net472 4.31μs 2.92ns 11.3ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6375

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.158 458.08 395.70

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 458ns 0.228ns 0.883ns 0.00802 0 0 576 B
master StartFinishSpan netcoreapp3.1 572ns 0.241ns 0.934ns 0.0078 0 0 576 B
master StartFinishSpan net472 737ns 0.746ns 2.89ns 0.0917 0 0 578 B
master StartFinishScope net6.0 562ns 0.786ns 3.04ns 0.00967 0 0 696 B
master StartFinishScope netcoreapp3.1 740ns 0.373ns 1.44ns 0.00927 0 0 696 B
master StartFinishScope net472 879ns 1.34ns 5.18ns 0.104 0 0 658 B
#6375 StartFinishSpan net6.0 396ns 0.188ns 0.729ns 0.00815 0 0 576 B
#6375 StartFinishSpan netcoreapp3.1 566ns 0.369ns 1.43ns 0.00756 0 0 576 B
#6375 StartFinishSpan net472 674ns 0.562ns 2.18ns 0.0915 0 0 578 B
#6375 StartFinishScope net6.0 521ns 0.376ns 1.41ns 0.00985 0 0 696 B
#6375 StartFinishScope netcoreapp3.1 796ns 0.439ns 1.64ns 0.0092 0 0 696 B
#6375 StartFinishScope net472 871ns 0.959ns 3.72ns 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 693ns 0.626ns 2.43ns 0.00977 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 878ns 0.466ns 1.74ns 0.00925 0 0 696 B
master RunOnMethodBegin net472 1.15μs 1.32ns 4.77ns 0.104 0 0 658 B
#6375 RunOnMethodBegin net6.0 651ns 0.193ns 0.723ns 0.00978 0 0 696 B
#6375 RunOnMethodBegin netcoreapp3.1 909ns 0.565ns 2.19ns 0.00906 0 0 696 B
#6375 RunOnMethodBegin net472 1.08μs 0.676ns 2.62ns 0.105 0 0 658 B

@e-n-0 e-n-0 force-pushed the flavien/iast/interpolatedstring-tests branch from a1f55fb to 90a741b Compare December 2, 2024 10:24
Copy link
Contributor

github-actions bot commented Dec 2, 2024

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

1 occurrences of :

-            "value": "'Reims','51100','France')",
-            "source": 0
-          },
-          {
-            "value": ";\nSELECT OrderID FROM Orders ORDER BY OrderID DESC LIMIT 1;"
+            "value": "'Reims','51100','France');\nSELECT OrderID FROM Orders ORDER BY OrderID DESC LIMIT 1;"

@e-n-0 e-n-0 marked this pull request as draft December 7, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:asm area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants