-
Notifications
You must be signed in to change notification settings - Fork 146
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][ATO]Add business logic event address to the waf #6701
[ASM][ATO]Add business logic event address to the waf #6701
Conversation
b2d4e28
to
5eb7f05
Compare
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:
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 (6701) - mean (69ms) : 66, 72
. : milestone, 69,
master - mean (69ms) : 66, 71
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6701) - mean (998ms) : 978, 1019
. : milestone, 998,
master - mean (998ms) : 977, 1018
. : milestone, 998,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6701) - mean (102ms) : 100, 104
. : milestone, 102,
master - mean (102ms) : 100, 104
. : milestone, 102,
section CallTarget+Inlining+NGEN
This PR (6701) - mean (676ms) : 660, 692
. : milestone, 676,
master - mean (673ms) : 656, 690
. : milestone, 673,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6701) - mean (89ms) : 87, 91
. : milestone, 89,
master - mean (89ms) : 87, 91
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (6701) - mean (626ms) : 608, 643
. : milestone, 626,
master - mean (634ms) : 618, 651
. : milestone, 634,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6701) - mean (191ms) : 187, 196
. : milestone, 191,
master - mean (191ms) : 186, 196
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6701) - mean (1,111ms) : 1080, 1142
. : milestone, 1111,
master - mean (1,110ms) : 1078, 1142
. : milestone, 1110,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6701) - mean (271ms) : 267, 275
. : milestone, 271,
master - mean (274ms) : 267, 282
. : milestone, 274,
section CallTarget+Inlining+NGEN
This PR (6701) - mean (863ms) : 833, 893
. : milestone, 863,
master - mean (869ms) : 829, 908
. : milestone, 869,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6701) - mean (262ms) : 257, 268
. : milestone, 262,
master - mean (262ms) : 258, 266
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (6701) - mean (841ms) : 804, 878
. : milestone, 841,
master - mean (848ms) : 817, 880
. : milestone, 848,
|
Benchmarks Report for appsec 🐌Benchmarks for #6701 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.Asm.AppSecBodyBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 | 1.129 | 192,211.30 | 216,950.79 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net6.0 | 1.180 | 178.58 | 151.28 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | AllCycleSimpleBody |
net6.0 | 191μs | 84.3ns | 316ns | 2.76 | 0 | 0 | 195.42 KB |
master | AllCycleSimpleBody |
netcoreapp3.1 | 296μs | 71.8ns | 249ns | 2.67 | 0 | 0 | 202.94 KB |
master | AllCycleSimpleBody |
net472 | 262μs | 216ns | 808ns | 37.1 | 2.09 | 0 | 233.74 KB |
master | AllCycleMoreComplexBody |
net6.0 | 192μs | 105ns | 380ns | 2.79 | 0 | 0 | 198.93 KB |
master | AllCycleMoreComplexBody |
netcoreapp3.1 | 303μs | 161ns | 603ns | 2.87 | 0 | 0 | 206.36 KB |
master | AllCycleMoreComplexBody |
net472 | 264μs | 130ns | 487ns | 37.6 | 2.11 | 0 | 237.26 KB |
master | ObjectExtractorSimpleBody |
net6.0 | 179ns | 0.111ns | 0.402ns | 0.00391 | 0 | 0 | 280 B |
master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 202ns | 0.173ns | 0.647ns | 0.00369 | 0 | 0 | 272 B |
master | ObjectExtractorSimpleBody |
net472 | 208ns | 0.109ns | 0.395ns | 0.0446 | 0 | 0 | 281 B |
master | ObjectExtractorMoreComplexBody |
net6.0 | 2.87μs | 1.49ns | 5.77ns | 0.0531 | 0 | 0 | 3.78 KB |
master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.73μs | 2.76ns | 10.3ns | 0.05 | 0 | 0 | 3.69 KB |
master | ObjectExtractorMoreComplexBody |
net472 | 4.42μs | 3.37ns | 12.6ns | 0.602 | 0.00662 | 0 | 3.8 KB |
#6701 | AllCycleSimpleBody |
net6.0 | 212μs | 160ns | 618ns | 2.74 | 0 | 0 | 195.28 KB |
#6701 | AllCycleSimpleBody |
netcoreapp3.1 | 317μs | 122ns | 457ns | 2.69 | 0 | 0 | 202.8 KB |
#6701 | AllCycleSimpleBody |
net472 | 284μs | 192ns | 743ns | 37.1 | 2.13 | 0 | 233.58 KB |
#6701 | AllCycleMoreComplexBody |
net6.0 | 217μs | 116ns | 432ns | 2.83 | 0 | 0 | 198.79 KB |
#6701 | AllCycleMoreComplexBody |
netcoreapp3.1 | 321μs | 92.5ns | 346ns | 2.88 | 0 | 0 | 206.22 KB |
#6701 | AllCycleMoreComplexBody |
net472 | 287μs | 236ns | 885ns | 37.6 | 2.15 | 0 | 237.1 KB |
#6701 | ObjectExtractorSimpleBody |
net6.0 | 151ns | 0.17ns | 0.635ns | 0.00394 | 0 | 0 | 280 B |
#6701 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 210ns | 0.118ns | 0.44ns | 0.00362 | 0 | 0 | 272 B |
#6701 | ObjectExtractorSimpleBody |
net472 | 231ns | 0.0901ns | 0.349ns | 0.0446 | 0 | 0 | 281 B |
#6701 | ObjectExtractorMoreComplexBody |
net6.0 | 2.9μs | 1.71ns | 6.63ns | 0.054 | 0 | 0 | 3.78 KB |
#6701 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.92μs | 3.48ns | 13ns | 0.0508 | 0 | 0 | 3.69 KB |
#6701 | ObjectExtractorMoreComplexBody |
net472 | 4.34μs | 2.09ns | 7.83ns | 0.602 | 0.00661 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EncodeArgs |
net6.0 | 37.9μs | 23.6ns | 81.7ns | 0.451 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
netcoreapp3.1 | 53.9μs | 18.8ns | 73ns | 0.433 | 0 | 0 | 32.4 KB |
master | EncodeArgs |
net472 | 66.1μs | 46.2ns | 179ns | 5.15 | 0.0661 | 0 | 32.5 KB |
master | EncodeLegacyArgs |
net6.0 | 79.9μs | 30.6ns | 110ns | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
netcoreapp3.1 | 107μs | 276ns | 1.07μs | 0 | 0 | 0 | 2.14 KB |
master | EncodeLegacyArgs |
net472 | 153μs | 95.8ns | 371ns | 0.308 | 0 | 0 | 2.15 KB |
#6701 | EncodeArgs |
net6.0 | 37.3μs | 16.8ns | 62.8ns | 0.464 | 0 | 0 | 32.4 KB |
#6701 | EncodeArgs |
netcoreapp3.1 | 54μs | 22.8ns | 88.3ns | 0.431 | 0 | 0 | 32.4 KB |
#6701 | EncodeArgs |
net472 | 66.3μs | 24.2ns | 93.9ns | 5.15 | 0.0664 | 0 | 32.5 KB |
#6701 | EncodeLegacyArgs |
net6.0 | 75.8μs | 427ns | 3.05μs | 0 | 0 | 0 | 2.14 KB |
#6701 | EncodeLegacyArgs |
netcoreapp3.1 | 105μs | 132ns | 511ns | 0 | 0 | 0 | 2.14 KB |
#6701 | EncodeLegacyArgs |
net472 | 153μs | 140ns | 541ns | 0.306 | 0 | 0 | 2.15 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunWafRealisticBenchmark |
net6.0 | 175μs | 93.2ns | 361ns | 0 | 0 | 0 | 2.54 KB |
master | RunWafRealisticBenchmark |
netcoreapp3.1 | 186μs | 190ns | 734ns | 0 | 0 | 0 | 2.49 KB |
master | RunWafRealisticBenchmark |
net472 | 201μs | 76.9ns | 288ns | 0.403 | 0 | 0 | 2.55 KB |
master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 116μs | 53.5ns | 200ns | 0 | 0 | 0 | 1.57 KB |
master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 122μs | 41.2ns | 148ns | 0 | 0 | 0 | 1.55 KB |
master | RunWafRealisticBenchmarkWithAttack |
net472 | 134μs | 31.3ns | 113ns | 0.2 | 0 | 0 | 1.58 KB |
#6701 | RunWafRealisticBenchmark |
net6.0 | 175μs | 163ns | 609ns | 0 | 0 | 0 | 2.54 KB |
#6701 | RunWafRealisticBenchmark |
netcoreapp3.1 | 187μs | 88.5ns | 343ns | 0 | 0 | 0 | 2.49 KB |
#6701 | RunWafRealisticBenchmark |
net472 | 201μs | 124ns | 465ns | 0.4 | 0 | 0 | 2.55 KB |
#6701 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 116μs | 116ns | 448ns | 0 | 0 | 0 | 1.57 KB |
#6701 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 123μs | 132ns | 511ns | 0 | 0 | 0 | 1.55 KB |
#6701 | RunWafRealisticBenchmarkWithAttack |
net472 | 132μs | 51.8ns | 201ns | 0.198 | 0 | 0 | 1.58 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #6701
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.3 KB
59.04 KB
1.74 KB
3.04%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
253.82 KB
255.91 KB
2.09 KB
0.82%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.3 KB | 59.04 KB | 1.74 KB | 3.04% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 253.82 KB | 255.91 KB | 2.09 KB | 0.82% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 59.9μs | 687ns | 6.87μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 60.9μs | 787ns | 7.83μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.9μs | 156ns | 812ns | 0 | 0 | 0 | 57.3 KB |
master | StringConcatAspectBenchmark |
net6.0 | 318μs | 1.34μs | 8.48μs | 0 | 0 | 0 | 253.82 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 349μs | 1.97μs | 13.3μs | 0 | 0 | 0 | 254.23 KB |
master | StringConcatAspectBenchmark |
net472 | 293μs | 6.62μs | 63.8μs | 0 | 0 | 0 | 278.53 KB |
#6701 | StringConcatBenchmark |
net6.0 | 52.3μs | 195ns | 825ns | 0 | 0 | 0 | 43.44 KB |
#6701 | StringConcatBenchmark |
netcoreapp3.1 | 54μs | 170ns | 614ns | 0 | 0 | 0 | 42.64 KB |
#6701 | StringConcatBenchmark |
net472 | 37.6μs | 132ns | 496ns | 0 | 0 | 0 | 59.04 KB |
#6701 | StringConcatAspectBenchmark |
net6.0 | 317μs | 1.76μs | 10.6μs | 0 | 0 | 0 | 255.91 KB |
#6701 | StringConcatAspectBenchmark |
netcoreapp3.1 | 342μs | 1.94μs | 13.6μs | 0 | 0 | 0 | 253.83 KB |
#6701 | StringConcatAspectBenchmark |
net472 | 294μs | 6.72μs | 65.8μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks Report for tracer 🐌Benchmarks for #6701 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.159 | 448.90 | 387.39 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.141 | 715.48 | 626.90 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 449ns | 0.72ns | 2.79ns | 0.00794 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 578ns | 0.985ns | 3.82ns | 0.00775 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 715ns | 0.759ns | 2.94ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 512ns | 1.53ns | 5.94ns | 0.00968 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 696ns | 1.67ns | 6.48ns | 0.00945 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 823ns | 0.875ns | 3.39ns | 0.104 | 0 | 0 | 658 B |
#6701 | StartFinishSpan |
net6.0 | 388ns | 0.63ns | 2.44ns | 0.00819 | 0 | 0 | 576 B |
#6701 | StartFinishSpan |
netcoreapp3.1 | 615ns | 1.5ns | 5.82ns | 0.00766 | 0 | 0 | 576 B |
#6701 | StartFinishSpan |
net472 | 627ns | 1.15ns | 4.46ns | 0.0916 | 0 | 0 | 578 B |
#6701 | StartFinishScope |
net6.0 | 558ns | 0.95ns | 3.68ns | 0.00968 | 0 | 0 | 696 B |
#6701 | StartFinishScope |
netcoreapp3.1 | 759ns | 1.98ns | 7.69ns | 0.00945 | 0 | 0 | 696 B |
#6701 | StartFinishScope |
net472 | 812ns | 2.43ns | 9.42ns | 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 | 612ns | 0.454ns | 1.76ns | 0.00983 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 1.05μs | 0.683ns | 2.65ns | 0.00916 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.16μs | 1.06ns | 4.1ns | 0.104 | 0 | 0 | 658 B |
#6701 | RunOnMethodBegin |
net6.0 | 592ns | 0.787ns | 3.05ns | 0.00984 | 0 | 0 | 696 B |
#6701 | RunOnMethodBegin |
netcoreapp3.1 | 946ns | 1.13ns | 4.37ns | 0.00936 | 0 | 0 | 696 B |
#6701 | RunOnMethodBegin |
net472 | 1.06μs | 1.74ns | 6.75ns | 0.104 | 0 | 0 | 658 B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary of changes
Add business logic event address to the waf on sdk login success / failure events
Reason for change
Otherwise, no fingerprint is generated on sdk custom events
Implementation details
Test coverage
Add some sdk test
Other details