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][IAST] Support manual JSON deserialisation (JavaScriptSerializer) #5238 #5251

Merged
merged 7 commits into from
Mar 14, 2024

Conversation

e-n-0
Copy link
Member

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

Summary of changes

  • Taint strings deserialised with a tainted Json from the System.Web.Extensions assembly for the JavaScriptSerializer.DeserializeObject(json) method

Reason for change

Add support of Json in IAST for the JavaScriptSerializer class.

Implementation details

  • Go Recursively through the whole parsed object to identify the tokens that are strings, and then taint it. The returned object is a native dotnet type, that can be a dictionary, an array or an object.

Test coverage

  • Unit tests on the DeserializeObject() method
  • Integration test on the AspNetMvc5 sample, /Iast/JavaScriptSerializerDeserializeObject with a Command Injection vulnerability to test the Json tainting

@e-n-0 e-n-0 changed the title Flavien/iast/java script serializer [ASM][IAST] Support manual JSON deserialisation (JavaScriptSerializer) #5238 Feb 29, 2024
@e-n-0 e-n-0 force-pushed the flavien/iast/JavaScriptSerializer branch from 7b796ba to cc0d750 Compare February 29, 2024 13:11
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Feb 29, 2024

Datadog Report

Branch report: flavien/iast/JavaScriptSerializer
Commit report: 388df10
Test service: dd-trace-dotnet

✅ 0 Failed, 327901 Passed, 1565 Skipped, 50m 50.85s Wall Time

@andrewlock
Copy link
Member

andrewlock commented Feb 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 (5251) - mean (73ms)  : 66, 81
     .   : milestone, 73,
    master - mean (72ms)  : 63, 81
     .   : milestone, 72,

    section CallTarget+Inlining+NGEN
    This PR (5251) - mean (994ms)  : 969, 1020
     .   : milestone, 994,
    master - mean (988ms)  : 965, 1011
     .   : milestone, 988,

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

    section CallTarget+Inlining+NGEN
    This PR (5251) - mean (715ms)  : 693, 737
     .   : milestone, 715,
    master - mean (712ms)  : 691, 733
     .   : milestone, 712,

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

    section CallTarget+Inlining+NGEN
    This PR (5251) - mean (666ms)  : 643, 689
     .   : milestone, 666,
    master - mean (667ms)  : 649, 686
     .   : milestone, 667,

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

    section CallTarget+Inlining+NGEN
    This PR (5251) - mean (1,075ms)  : 1052, 1099
     .   : milestone, 1075,
    master - mean (1,059ms)  : 1035, 1083
     .   : milestone, 1059,

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

    section CallTarget+Inlining+NGEN
    This PR (5251) - mean (868ms)  : 841, 895
     .   : milestone, 868,
    master - mean (866ms)  : 841, 890
     .   : milestone, 866,

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

    section CallTarget+Inlining+NGEN
    This PR (5251) - mean (849ms)  : 826, 872
     .   : milestone, 849,
    master - mean (852ms)  : 823, 880
     .   : milestone, 852,

Loading

@andrewlock
Copy link
Member

Benchmarks Report 🐌

Benchmarks for #5251 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.132
  • 2 benchmarks are slower, with geometric mean 1.137
  • 2 benchmarks have fewer allocations
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

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

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.67μs 48.2ns 316ns 0.0269 0.00896 0 7.5 KB
master StartStopWithChild netcoreapp3.1 10.6μs 56.4ns 309ns 0.0316 0.0158 0 7.59 KB
master StartStopWithChild net472 17μs 55.7ns 216ns 1.33 0.337 0.101 7.96 KB
#5251 StartStopWithChild net6.0 8.53μs 45ns 229ns 0.0217 0.00868 0 7.49 KB
#5251 StartStopWithChild netcoreapp3.1 11μs 61.7ns 414ns 0.0217 0.0109 0 7.59 KB
#5251 StartStopWithChild net472 17.3μs 43.9ns 170ns 1.34 0.345 0.112 7.95 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 459μs 325ns 1.26μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 619μs 420ns 1.57μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 814μs 208ns 777ns 0.408 0 0 3.3 KB
#5251 WriteAndFlushEnrichedTraces net6.0 459μs 175ns 655ns 0 0 0 2.7 KB
#5251 WriteAndFlushEnrichedTraces netcoreapp3.1 618μs 267ns 1.03μs 0 0 0 2.7 KB
#5251 WriteAndFlushEnrichedTraces net472 808μs 341ns 1.32μs 0.403 0 0 3.3 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5251

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody‑net472 1.157 3,831.29 4,434.24

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 40.4μs 46ns 178ns 0.0202 0 0 2.36 KB
master AllCycleSimpleBody netcoreapp3.1 44.3μs 80.6ns 312ns 0.022 0 0 2.34 KB
master AllCycleSimpleBody net472 46.4μs 15.7ns 60.9ns 0.37 0 0 2.41 KB
master AllCycleMoreComplexBody net6.0 214μs 143ns 497ns 0.107 0 0 9.84 KB
master AllCycleMoreComplexBody netcoreapp3.1 226μs 571ns 2.21μs 0.112 0 0 9.73 KB
master AllCycleMoreComplexBody net472 241μs 155ns 602ns 1.56 0 0 9.91 KB
master ObjectExtractorSimpleBody net6.0 141ns 0.191ns 0.739ns 0.00392 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 198ns 0.139ns 0.519ns 0.00369 0 0 272 B
master ObjectExtractorSimpleBody net472 172ns 0.201ns 0.779ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3μs 1.25ns 4.51ns 0.0524 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.85μs 1.97ns 7.61ns 0.05 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.83μs 2.13ns 7.98ns 0.603 0.00574 0 3.8 KB
#5251 AllCycleSimpleBody net6.0 40.7μs 18.9ns 73.3ns 0.0203 0 0 2.36 KB
#5251 AllCycleSimpleBody netcoreapp3.1 43.3μs 45.7ns 177ns 0.0216 0 0 2.34 KB
#5251 AllCycleSimpleBody net472 46.8μs 32.4ns 126ns 0.374 0 0 2.41 KB
#5251 AllCycleMoreComplexBody net6.0 213μs 91.6ns 355ns 0.106 0 0 9.84 KB
#5251 AllCycleMoreComplexBody netcoreapp3.1 225μs 68.1ns 245ns 0.113 0 0 9.73 KB
#5251 AllCycleMoreComplexBody net472 251μs 1.34μs 8.02μs 1.56 0 0 9.91 KB
#5251 ObjectExtractorSimpleBody net6.0 145ns 0.0878ns 0.328ns 0.0039 0 0 280 B
#5251 ObjectExtractorSimpleBody netcoreapp3.1 205ns 0.157ns 0.586ns 0.00372 0 0 272 B
#5251 ObjectExtractorSimpleBody net472 171ns 0.105ns 0.394ns 0.0446 0 0 281 B
#5251 ObjectExtractorMoreComplexBody net6.0 2.99μs 1.67ns 6.26ns 0.0536 0 0 3.78 KB
#5251 ObjectExtractorMoreComplexBody netcoreapp3.1 4.02μs 2.89ns 10ns 0.0502 0 0 3.69 KB
#5251 ObjectExtractorMoreComplexBody net472 4.44μs 1.91ns 7.39ns 0.601 0.00666 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 52.7μs 62.6ns 242ns 0.426 0 0 30.94 KB
master EncodeArgs netcoreapp3.1 70.6μs 68.3ns 246ns 0.42 0 0 31.47 KB
master EncodeArgs net472 85.8μs 131ns 507ns 5.12 0.0853 0 32.27 KB
master EncodeLegacyArgs net6.0 130μs 343ns 1.24μs 0.45 0 0 33.89 KB
master EncodeLegacyArgs netcoreapp3.1 157μs 658ns 2.55μs 0.387 0 0 34.09 KB
master EncodeLegacyArgs net472 213μs 432ns 1.67μs 5.52 0.424 0 34.99 KB
#5251 EncodeArgs net6.0 52.6μs 64.2ns 240ns 0.418 0 0 30.94 KB
#5251 EncodeArgs netcoreapp3.1 69.4μs 97.7ns 365ns 0.413 0 0 31.47 KB
#5251 EncodeArgs net472 85.4μs 45.5ns 164ns 5.12 0.0853 0 32.27 KB
#5251 EncodeLegacyArgs net6.0 129μs 263ns 950ns 0.436 0 0 33.89 KB
#5251 EncodeLegacyArgs netcoreapp3.1 155μs 429ns 1.66μs 0.463 0 0 34.09 KB
#5251 EncodeLegacyArgs net472 210μs 102ns 381ns 5.53 0.417 0 34.99 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 193μs 183ns 683ns 0.0972 0 0 6.51 KB
master RunWafRealisticBenchmark netcoreapp3.1 205μs 363ns 1.4μs 0 0 0 6.49 KB
master RunWafRealisticBenchmark net472 224μs 156ns 604ns 1 0 0 6.59 KB
master RunWafRealisticBenchmarkWithAttack net6.0 125μs 80.9ns 313ns 0.0623 0 0 4.15 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 136μs 283ns 1.09μs 0 0 0 4.14 KB
master RunWafRealisticBenchmarkWithAttack net472 147μs 53.6ns 208ns 0.66 0 0 4.19 KB
#5251 RunWafRealisticBenchmark net6.0 192μs 120ns 466ns 0.0966 0 0 6.51 KB
#5251 RunWafRealisticBenchmark netcoreapp3.1 204μs 321ns 1.24μs 0 0 0 6.49 KB
#5251 RunWafRealisticBenchmark net472 224μs 126ns 454ns 1.01 0 0 6.59 KB
#5251 RunWafRealisticBenchmarkWithAttack net6.0 127μs 149ns 578ns 0.0626 0 0 4.15 KB
#5251 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 133μs 103ns 399ns 0 0 0 4.14 KB
#5251 RunWafRealisticBenchmarkWithAttack net472 148μs 66.2ns 257ns 0.596 0 0 4.19 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 175μs 229ns 886ns 0.259 0 0 18.26 KB
master SendRequest netcoreapp3.1 194μs 299ns 1.16μs 0.193 0 0 20.42 KB
master SendRequest net472 0.00037ns 0.000168ns 0.000627ns 0 0 0 0 b
#5251 SendRequest net6.0 173μs 205ns 795ns 0.171 0 0 18.26 KB
#5251 SendRequest netcoreapp3.1 194μs 289ns 1.04μs 0.192 0 0 20.42 KB
#5251 SendRequest net472 0.00137ns 0.000331ns 0.00128ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #5251

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.67 KB 41.46 KB -209 B -0.50%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 534μs 1.28μs 4.95μs 0.541 0 0 41.67 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 659μs 1.15μs 4.46μs 0.327 0 0 41.58 KB
master WriteAndFlushEnrichedTraces net472 842μs 3.94μs 15.3μs 8.22 2.47 0.411 53.24 KB
#5251 WriteAndFlushEnrichedTraces net6.0 538μs 1.79μs 6.95μs 0.551 0 0 41.46 KB
#5251 WriteAndFlushEnrichedTraces netcoreapp3.1 658μs 2.07μs 8.04μs 0.329 0 0 41.63 KB
#5251 WriteAndFlushEnrichedTraces net472 853μs 3.11μs 12μs 8.39 2.52 0.419 53.26 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.12μs 0.443ns 1.72ns 0.0107 0 0 776 B
master ExecuteNonQuery netcoreapp3.1 1.48μs 0.572ns 2.22ns 0.0106 0 0 776 B
master ExecuteNonQuery net472 1.73μs 0.667ns 2.5ns 0.117 0 0 738 B
#5251 ExecuteNonQuery net6.0 1.07μs 1.16ns 4.48ns 0.0106 0 0 776 B
#5251 ExecuteNonQuery netcoreapp3.1 1.47μs 0.479ns 1.79ns 0.0104 0 0 776 B
#5251 ExecuteNonQuery net472 1.77μs 0.61ns 2.2ns 0.116 0 0 738 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.24μs 0.591ns 2.05ns 0.0136 0 0 944 B
master CallElasticsearch netcoreapp3.1 1.5μs 3.34ns 12.9ns 0.0129 0 0 944 B
master CallElasticsearch net472 2.46μs 0.645ns 2.5ns 0.152 0 0 963 B
master CallElasticsearchAsync net6.0 1.29μs 0.605ns 2.26ns 0.0129 0 0 920 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 2.81ns 10.9ns 0.0134 0 0 992 B
master CallElasticsearchAsync net472 2.7μs 1.58ns 6.12ns 0.161 0 0 1.02 KB
#5251 CallElasticsearch net6.0 1.24μs 0.842ns 3.15ns 0.0131 0 0 944 B
#5251 CallElasticsearch netcoreapp3.1 1.6μs 5.34ns 20.7ns 0.0126 0 0 944 B
#5251 CallElasticsearch net472 2.45μs 1.79ns 6.93ns 0.153 0 0 963 B
#5251 CallElasticsearchAsync net6.0 1.32μs 0.601ns 2.25ns 0.0129 0 0 920 B
#5251 CallElasticsearchAsync netcoreapp3.1 1.6μs 1.2ns 4.65ns 0.0128 0 0 992 B
#5251 CallElasticsearchAsync net472 2.6μs 1.83ns 7.07ns 0.162 0 0 1.02 KB
Benchmarks.Trace.GraphQLBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5251

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 1.132 1,939.57 1,713.72

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.27μs 0.688ns 2.57ns 0.0127 0 0 920 B
master ExecuteAsync netcoreapp3.1 1.58μs 0.947ns 3.67ns 0.0119 0 0 920 B
master ExecuteAsync net472 1.94μs 0.783ns 3.03ns 0.139 0 0 883 B
#5251 ExecuteAsync net6.0 1.29μs 0.682ns 2.55ns 0.0128 0 0 920 B
#5251 ExecuteAsync netcoreapp3.1 1.6μs 0.548ns 2.05ns 0.0121 0 0 920 B
#5251 ExecuteAsync net472 1.71μs 0.479ns 1.79ns 0.14 0 0 883 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.14μs 2.21ns 7.97ns 0.0291 0 0 2.1 KB
master SendAsync netcoreapp3.1 5.03μs 1.83ns 6.85ns 0.0353 0 0 2.64 KB
master SendAsync net472 7.72μs 5.55ns 21.5ns 0.523 0 0 3.31 KB
#5251 SendAsync net6.0 4.1μs 1.47ns 5.68ns 0.0288 0 0 2.1 KB
#5251 SendAsync netcoreapp3.1 4.99μs 2.51ns 9.4ns 0.0349 0 0 2.64 KB
#5251 SendAsync net472 7.74μs 3.19ns 12.4ns 0.524 0 0 3.31 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #5251

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 57.34 KB 59.36 KB 2.02 KB 3.52%

Fewer allocations 🎉 in #5251

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 229.38 KB 221.18 KB -8.19 KB -3.57%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 58.5μs 742ns 7.38μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 52.6μs 264ns 1.24μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.5μs 96.4ns 361ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 274μs 1.32μs 6.71μs 0 0 0 204.17 KB
master StringConcatAspectBenchmark netcoreapp3.1 268μs 3.48μs 33.7μs 0 0 0 202.87 KB
master StringConcatAspectBenchmark net472 217μs 1.5μs 13.9μs 0 0 0 229.38 KB
#5251 StringConcatBenchmark net6.0 58.4μs 656ns 6.39μs 0 0 0 43.44 KB
#5251 StringConcatBenchmark netcoreapp3.1 52.4μs 244ns 914ns 0 0 0 42.64 KB
#5251 StringConcatBenchmark net472 37.5μs 74.3ns 278ns 0 0 0 59.36 KB
#5251 StringConcatAspectBenchmark net6.0 260μs 1.34μs 6.43μs 0 0 0 204.18 KB
#5251 StringConcatAspectBenchmark netcoreapp3.1 280μs 1.17μs 7.83μs 0 0 0 203.1 KB
#5251 StringConcatAspectBenchmark net472 237μs 2.89μs 27.3μs 0 0 0 221.18 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.53μs 0.753ns 2.82ns 0.0222 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 2.3μs 0.975ns 3.65ns 0.0208 0 0 1.58 KB
master EnrichedLog net472 2.49μs 1.09ns 4.23ns 0.239 0 0 1.51 KB
#5251 EnrichedLog net6.0 1.4μs 0.57ns 2.21ns 0.0224 0 0 1.58 KB
#5251 EnrichedLog netcoreapp3.1 2.22μs 1.24ns 4.81ns 0.0211 0 0 1.58 KB
#5251 EnrichedLog net472 2.72μs 1.98ns 7.68ns 0.239 0 0 1.51 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 71.3ns 257ns 0 0 0 4.22 KB
master EnrichedLog netcoreapp3.1 119μs 81.8ns 317ns 0.059 0 0 4.22 KB
master EnrichedLog net472 147μs 93.9ns 364ns 0.66 0.22 0 4.4 KB
#5251 EnrichedLog net6.0 112μs 87.1ns 338ns 0.056 0 0 4.22 KB
#5251 EnrichedLog netcoreapp3.1 120μs 253ns 979ns 0 0 0 4.22 KB
#5251 EnrichedLog net472 147μs 100ns 388ns 0.658 0.219 0 4.4 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.02μs 1.35ns 5.23ns 0.0303 0 0 2.14 KB
master EnrichedLog netcoreapp3.1 4.19μs 2.25ns 8.72ns 0.0273 0 0 2.14 KB
master EnrichedLog net472 4.84μs 3.7ns 14.3ns 0.31 0 0 1.95 KB
#5251 EnrichedLog net6.0 2.96μs 0.91ns 3.4ns 0.0296 0 0 2.14 KB
#5251 EnrichedLog netcoreapp3.1 4.11μs 1.41ns 5.46ns 0.0286 0 0 2.14 KB
#5251 EnrichedLog net472 4.78μs 1.3ns 4.85ns 0.31 0 0 1.95 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.929ns 3.6ns 0.0151 0 0 1.11 KB
master SendReceive netcoreapp3.1 1.77μs 1.74ns 6.75ns 0.0151 0 0 1.11 KB
master SendReceive net472 2.11μs 0.942ns 3.52ns 0.178 0 0 1.12 KB
#5251 SendReceive net6.0 1.32μs 0.425ns 1.65ns 0.0152 0 0 1.11 KB
#5251 SendReceive netcoreapp3.1 1.76μs 0.586ns 2.11ns 0.015 0 0 1.11 KB
#5251 SendReceive net472 2.05μs 1.28ns 4.96ns 0.178 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.75μs 0.771ns 2.99ns 0.0206 0 0 1.54 KB
master EnrichedLog netcoreapp3.1 3.82μs 1.08ns 4.2ns 0.0212 0 0 1.58 KB
master EnrichedLog net472 4.22μs 1.1ns 4.13ns 0.313 0 0 1.97 KB
#5251 EnrichedLog net6.0 2.8μs 0.743ns 2.88ns 0.0211 0 0 1.54 KB
#5251 EnrichedLog netcoreapp3.1 4.01μs 1.53ns 5.74ns 0.0218 0 0 1.58 KB
#5251 EnrichedLog net472 4.34μs 2.22ns 8.3ns 0.313 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5251

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.118 452.56 505.82

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 453ns 0.386ns 1.39ns 0.00753 0 0 544 B
master StartFinishSpan netcoreapp3.1 756ns 1.26ns 4.89ns 0.00722 0 0 544 B
master StartFinishSpan net472 773ns 1.83ns 7.1ns 0.0867 0 0 546 B
master StartFinishScope net6.0 516ns 0.63ns 2.44ns 0.00924 0 0 664 B
master StartFinishScope netcoreapp3.1 824ns 1.26ns 4.89ns 0.00898 0 0 664 B
master StartFinishScope net472 932ns 2.43ns 9.4ns 0.0992 0 0 626 B
#5251 StartFinishSpan net6.0 506ns 0.396ns 1.53ns 0.00771 0 0 544 B
#5251 StartFinishSpan netcoreapp3.1 728ns 0.97ns 3.76ns 0.00716 0 0 544 B
#5251 StartFinishSpan net472 757ns 2.26ns 8.75ns 0.0864 0 0 546 B
#5251 StartFinishScope net6.0 530ns 0.921ns 3.57ns 0.00927 0 0 664 B
#5251 StartFinishScope netcoreapp3.1 855ns 0.557ns 2.16ns 0.009 0 0 664 B
#5251 StartFinishScope net472 954ns 1.12ns 4.36ns 0.0991 0 0 626 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 643ns 1.19ns 4.62ns 0.00937 0 0 664 B
master RunOnMethodBegin netcoreapp3.1 1.02μs 1.83ns 7.08ns 0.00907 0 0 664 B
master RunOnMethodBegin net472 1.1μs 2.11ns 8.17ns 0.0991 0 0 626 B
#5251 RunOnMethodBegin net6.0 716ns 0.865ns 3.35ns 0.00924 0 0 664 B
#5251 RunOnMethodBegin netcoreapp3.1 1.06μs 0.861ns 3.33ns 0.00899 0 0 664 B
#5251 RunOnMethodBegin net472 1.15μs 0.681ns 2.64ns 0.0992 0 0 626 B

@andrewlock
Copy link
Member

andrewlock commented Feb 29, 2024

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 (5251) (10.710M)   : 0, 10709909
    master (10.925M)   : 0, 10925303
    benchmarks/2.9.0 (10.725M)   : 0, 10725277

    section Automatic
    This PR (5251) (7.379M)   : 0, 7378651
    master (7.496M)   : 0, 7496085
    benchmarks/2.9.0 (7.627M)   : 0, 7626893

    section Trace stats
    This PR (5251) (7.712M)   : 0, 7712275
    master (7.872M)   : 0, 7871947

    section Manual
    This PR (5251) (9.380M)   : 0, 9380341
    master (9.635M)   : 0, 9635035

    section Manual + Automatic
    This PR (5251) (6.897M)   : 0, 6896978
    master (7.114M)   : 0, 7113688

    section Version Conflict
    This PR (5251) (6.402M)   : 0, 6402018
    master (6.292M)   : 0, 6292435

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5251) (9.652M)   : 0, 9651711

    section Automatic
    This PR (5251) (6.700M)   : 0, 6700492

    section Trace stats
    This PR (5251) (4.886M)   : 0, 4886300

    section Manual
    This PR (5251) (8.363M)   : 0, 8363268

    section Manual + Automatic
    This PR (5251) (6.199M)   : 0, 6199479

    section Version Conflict
    This PR (5251) (5.860M)   : 0, 5859598

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5251) (10.421M)   : 0, 10421317
    master (9.856M)   : 0, 9856447
    benchmarks/2.9.0 (9.878M)   : 0, 9877925

    section Automatic
    This PR (5251) (7.523M)   : 0, 7523000
    master (7.076M)   : 0, 7076232
    benchmarks/2.9.0 (7.376M)   : 0, 7376498

    section Trace stats
    This PR (5251) (7.723M)   : 0, 7722848
    master (7.404M)   : 0, 7404111

    section Manual
    This PR (5251) (9.255M)   : 0, 9254726
    master (8.658M)   : 0, 8657799

    section Manual + Automatic
    This PR (5251) (7.227M)   : 0, 7227061
    master (6.832M)   : 0, 6831716

    section Version Conflict
    This PR (5251) (6.453M)   : 0, 6453398
    master (6.173M)   : 0, 6172929

Loading
gantt
    title Throughput Linux x64 (ASM) (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5251) (7.409M)   : 0, 7408864
    master (7.559M)   : 0, 7559179
    benchmarks/2.9.0 (7.896M)   : 0, 7895750

    section No attack
    This PR (5251) (1.836M)   : 0, 1835739
    master (1.844M)   : 0, 1844300
    benchmarks/2.9.0 (3.239M)   : 0, 3239357

    section Attack
    This PR (5251) (1.455M)   : 0, 1454830
    master (1.451M)   : 0, 1451050
    benchmarks/2.9.0 (2.532M)   : 0, 2532305

    section Blocking
    This PR (5251) (3.186M)   : 0, 3186291
    master (3.102M)   : 0, 3101736

    section IAST default
    This PR (5251) (6.578M)   : 0, 6578130
    master (6.434M)   : 0, 6433840

    section IAST full
    This PR (5251) (5.597M)   : 0, 5597486
    master (5.626M)   : 0, 5625514

    section Base vuln
    This PR (5251) (0.941M)   : 0, 940820
    master (0.917M)   : 0, 917115

    section IAST vuln
    This PR (5251) (0.854M)   : 0, 853639
    master (0.881M)   : 0, 881291

Loading

@e-n-0 e-n-0 marked this pull request as ready for review February 29, 2024 16:57
@e-n-0 e-n-0 requested a review from a team as a code owner February 29, 2024 16:57
@e-n-0 e-n-0 requested a review from daniel-romano-DD March 5, 2024 16:20
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD left a comment

Choose a reason for hiding this comment

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

LGTM with a small NIT. Thanks a lot :)

@e-n-0 e-n-0 force-pushed the flavien/iast/JavaScriptSerializer branch from 5aafa71 to 6cfacaa Compare March 11, 2024 17:04
@e-n-0 e-n-0 force-pushed the flavien/iast/JavaScriptSerializer branch from 6cfacaa to 879ace1 Compare March 13, 2024 12:32
@andrewlock
Copy link
Member

andrewlock commented Mar 13, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #5251 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.199
  • 1 benchmarks are slower, with geometric mean 1.145
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

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

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #5251

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 7.96 KB 8.13 KB 167 B 2.10%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.81μs 47.6ns 256ns 0.0297 0.0127 0 7.49 KB
master StartStopWithChild netcoreapp3.1 10.5μs 49.5ns 222ns 0.0259 0.0104 0 7.59 KB
master StartStopWithChild net472 17.1μs 61.1ns 237ns 1.34 0.367 0.111 7.96 KB
#5251 StartStopWithChild net6.0 8.71μs 49.1ns 330ns 0.0357 0.0134 0 7.49 KB
#5251 StartStopWithChild netcoreapp3.1 10.5μs 51.1ns 205ns 0.0262 0.0105 0 7.59 KB
#5251 StartStopWithChild net472 17.1μs 34.9ns 126ns 1.38 0.368 0.128 8.13 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 451μs 358ns 1.34μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 601μs 253ns 979ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 795μs 348ns 1.35μs 0.398 0 0 3.3 KB
#5251 WriteAndFlushEnrichedTraces net6.0 459μs 276ns 1.07μs 0 0 0 2.7 KB
#5251 WriteAndFlushEnrichedTraces netcoreapp3.1 624μs 1.54μs 5.95μs 0 0 0 2.7 KB
#5251 WriteAndFlushEnrichedTraces net472 815μs 406ns 1.57μs 0.406 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 170μs 126ns 487ns 0.253 0 0 18.3 KB
master SendRequest netcoreapp3.1 193μs 306ns 1.1μs 0.191 0 0 20.46 KB
master SendRequest net472 0.000164ns 8.26E‑05ns 0.000309ns 0 0 0 0 b
#5251 SendRequest net6.0 168μs 259ns 1μs 0.251 0 0 18.3 KB
#5251 SendRequest netcoreapp3.1 195μs 336ns 1.3μs 0.197 0 0 20.48 KB
#5251 SendRequest net472 8.28E‑05ns 5.77E‑05ns 0.000208ns 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 516μs 517ns 1.93μs 0.53 0 0 41.52 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 652μs 785ns 2.83μs 0.329 0 0 41.9 KB
master WriteAndFlushEnrichedTraces net472 847μs 3.45μs 12.9μs 8.28 2.48 0.414 53.34 KB
#5251 WriteAndFlushEnrichedTraces net6.0 533μs 312ns 1.08μs 0.532 0 0 41.41 KB
#5251 WriteAndFlushEnrichedTraces netcoreapp3.1 642μs 1.26μs 4.87μs 0.321 0 0 41.73 KB
#5251 WriteAndFlushEnrichedTraces net472 839μs 3.33μs 12.9μs 8.19 2.59 0.431 53.24 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.12μs 0.647ns 2.51ns 0.0106 0 0 776 B
master ExecuteNonQuery netcoreapp3.1 1.56μs 0.608ns 2.35ns 0.01 0 0 776 B
master ExecuteNonQuery net472 1.79μs 0.804ns 3.11ns 0.117 0 0 738 B
#5251 ExecuteNonQuery net6.0 1.15μs 0.709ns 2.74ns 0.0108 0 0 776 B
#5251 ExecuteNonQuery netcoreapp3.1 1.47μs 0.927ns 3.59ns 0.0106 0 0 776 B
#5251 ExecuteNonQuery net472 1.88μs 1.24ns 4.48ns 0.117 0 0 738 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.23μs 2.55ns 9.2ns 0.0142 0 0 1 KB
master CallElasticsearch netcoreapp3.1 1.59μs 0.438ns 1.64ns 0.0135 0 0 1 KB
master CallElasticsearch net472 2.46μs 1.52ns 5.88ns 0.16 0 0 1.01 KB
master CallElasticsearchAsync net6.0 1.28μs 0.348ns 1.3ns 0.0136 0 0 976 B
master CallElasticsearchAsync netcoreapp3.1 1.61μs 0.614ns 2.3ns 0.0138 0 0 1.05 KB
master CallElasticsearchAsync net472 2.54μs 1.02ns 3.68ns 0.169 0 0 1.07 KB
#5251 CallElasticsearch net6.0 1.28μs 0.383ns 1.43ns 0.0141 0 0 1 KB
#5251 CallElasticsearch netcoreapp3.1 1.56μs 1.22ns 4.58ns 0.0134 0 0 1 KB
#5251 CallElasticsearch net472 2.55μs 1.28ns 4.79ns 0.16 0 0 1.01 KB
#5251 CallElasticsearchAsync net6.0 1.36μs 1.04ns 3.88ns 0.0137 0 0 976 B
#5251 CallElasticsearchAsync netcoreapp3.1 1.75μs 0.799ns 2.88ns 0.0139 0 0 1.05 KB
#5251 CallElasticsearchAsync net472 2.57μs 1.69ns 6.53ns 0.168 0 0 1.07 KB
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5251

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 1.145 1,745.25 1,997.99

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.22μs 1.19ns 4.59ns 0.0129 0 0 920 B
master ExecuteAsync netcoreapp3.1 1.67μs 0.583ns 2.26ns 0.0126 0 0 920 B
master ExecuteAsync net472 1.75μs 0.682ns 2.64ns 0.14 0 0 883 B
#5251 ExecuteAsync net6.0 1.28μs 1.49ns 5.75ns 0.0128 0 0 920 B
#5251 ExecuteAsync netcoreapp3.1 1.68μs 0.826ns 3.09ns 0.0124 0 0 920 B
#5251 ExecuteAsync net472 2μs 0.615ns 2.3ns 0.14 0 0 883 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.12μs 2.85ns 10.7ns 0.0288 0 0 2.15 KB
master SendAsync netcoreapp3.1 4.97μs 5.16ns 20ns 0.0371 0 0 2.69 KB
master SendAsync net472 7.85μs 1.86ns 7.22ns 0.535 0 0 3.37 KB
#5251 SendAsync net6.0 4.33μs 1.46ns 5.46ns 0.0303 0 0 2.15 KB
#5251 SendAsync netcoreapp3.1 5.05μs 2.68ns 10ns 0.0353 0 0 2.69 KB
#5251 SendAsync net472 7.81μs 2.47ns 9.58ns 0.534 0 0 3.37 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.5μs 0.691ns 2.58ns 0.0232 0 0 1.63 KB
master EnrichedLog netcoreapp3.1 2.22μs 1.86ns 6.94ns 0.0224 0 0 1.63 KB
master EnrichedLog net472 2.53μs 1.03ns 4.01ns 0.246 0 0 1.56 KB
#5251 EnrichedLog net6.0 1.45μs 0.581ns 2.18ns 0.0227 0 0 1.63 KB
#5251 EnrichedLog netcoreapp3.1 2.28μs 1.58ns 5.91ns 0.0217 0 0 1.63 KB
#5251 EnrichedLog net472 2.46μs 0.981ns 3.67ns 0.248 0 0 1.56 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 114μs 281ns 1.09μs 0.0573 0 0 4.22 KB
master EnrichedLog netcoreapp3.1 121μs 364ns 1.41μs 0 0 0 4.22 KB
master EnrichedLog net472 149μs 159ns 615ns 0.679 0.226 0 4.4 KB
#5251 EnrichedLog net6.0 113μs 166ns 619ns 0.0573 0 0 4.22 KB
#5251 EnrichedLog netcoreapp3.1 118μs 59.5ns 214ns 0 0 0 4.22 KB
#5251 EnrichedLog net472 146μs 126ns 488ns 0.658 0.219 0 4.4 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.15μs 1.44ns 5.58ns 0.0304 0 0 2.19 KB
master EnrichedLog netcoreapp3.1 4.08μs 1.4ns 5.23ns 0.0306 0 0 2.19 KB
master EnrichedLog net472 4.91μs 1.39ns 5.4ns 0.318 0 0 2.01 KB
#5251 EnrichedLog net6.0 3.05μs 0.95ns 3.43ns 0.031 0 0 2.19 KB
#5251 EnrichedLog netcoreapp3.1 4.11μs 1.25ns 4.67ns 0.029 0 0 2.19 KB
#5251 EnrichedLog net472 5.02μs 2.4ns 9.28ns 0.317 0 0 2.01 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.38μs 0.695ns 2.6ns 0.0165 0 0 1.17 KB
master SendReceive netcoreapp3.1 1.84μs 0.687ns 2.48ns 0.0156 0 0 1.17 KB
master SendReceive net472 2.16μs 1.18ns 4.43ns 0.185 0 0 1.17 KB
#5251 SendReceive net6.0 1.42μs 0.823ns 3.19ns 0.0162 0 0 1.17 KB
#5251 SendReceive netcoreapp3.1 1.76μs 0.524ns 2.03ns 0.0159 0 0 1.17 KB
#5251 SendReceive net472 2.23μs 0.71ns 2.46ns 0.186 0 0 1.17 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.79μs 0.742ns 2.78ns 0.021 0 0 1.54 KB
master EnrichedLog netcoreapp3.1 3.97μs 1.31ns 5.07ns 0.0219 0 0 1.58 KB
master EnrichedLog net472 4.23μs 1.67ns 6.23ns 0.312 0 0 1.97 KB
#5251 EnrichedLog net6.0 2.72μs 1.05ns 3.94ns 0.0216 0 0 1.54 KB
#5251 EnrichedLog netcoreapp3.1 3.78μs 1.62ns 6.08ns 0.0209 0 0 1.58 KB
#5251 EnrichedLog net472 4.45μs 2.33ns 9.04ns 0.311 0 0 1.97 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5251

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.199 625.91 521.82

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 537ns 0.784ns 3.04ns 0.00755 0 0 544 B
master StartFinishSpan netcoreapp3.1 717ns 2.08ns 7.8ns 0.0074 0 0 544 B
master StartFinishSpan net472 778ns 1.17ns 4.52ns 0.0865 0 0 546 B
master StartFinishScope net6.0 626ns 0.538ns 2.01ns 0.00932 0 0 664 B
master StartFinishScope netcoreapp3.1 850ns 1.43ns 5.33ns 0.00899 0 0 664 B
master StartFinishScope net472 966ns 1.32ns 5.12ns 0.099 0 0 626 B
#5251 StartFinishSpan net6.0 492ns 0.898ns 3.48ns 0.00762 0 0 544 B
#5251 StartFinishSpan netcoreapp3.1 766ns 1.43ns 5.54ns 0.0072 0 0 544 B
#5251 StartFinishSpan net472 706ns 1.34ns 5.18ns 0.0864 0 0 546 B
#5251 StartFinishScope net6.0 523ns 0.989ns 3.83ns 0.00939 0 0 664 B
#5251 StartFinishScope netcoreapp3.1 817ns 1.59ns 6.15ns 0.00902 0 0 664 B
#5251 StartFinishScope net472 903ns 2.37ns 9.19ns 0.0994 0 0 626 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 699ns 0.801ns 3.1ns 0.00914 0 0 664 B
master RunOnMethodBegin netcoreapp3.1 890ns 0.532ns 2.06ns 0.0091 0 0 664 B
master RunOnMethodBegin net472 1.13μs 0.605ns 2.34ns 0.0992 0 0 626 B
#5251 RunOnMethodBegin net6.0 641ns 1.22ns 4.74ns 0.00927 0 0 664 B
#5251 RunOnMethodBegin netcoreapp3.1 956ns 0.711ns 2.56ns 0.00892 0 0 664 B
#5251 RunOnMethodBegin net472 1.02μs 1.32ns 5.1ns 0.0995 0 0 626 B

@e-n-0 e-n-0 force-pushed the flavien/iast/JavaScriptSerializer branch from 879ace1 to cd52e27 Compare March 13, 2024 14:11
@e-n-0 e-n-0 merged commit 3ca3943 into master Mar 14, 2024
54 of 57 checks passed
@e-n-0 e-n-0 deleted the flavien/iast/JavaScriptSerializer branch March 14, 2024 12:48
@github-actions github-actions bot added this to the vNext milestone Mar 14, 2024
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.

3 participants