-
Notifications
You must be signed in to change notification settings - Fork 145
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
base: master
Are you sure you want to change the base?
Conversation
6a1c526
to
458dbd5
Compare
Datadog ReportBranch report: ✅ 0 Failed, 446600 Passed, 2762 Skipped, 20h 0m 27.38s Total Time |
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 (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,
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,
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,
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,
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,
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,
|
Benchmarks Report for appsec 🐌Benchmarks for #6375 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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations
|
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 |
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
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
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
|
458dbd5
to
a1f55fb
Compare
Benchmarks Report for tracer 🐌Benchmarks for #6375 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.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 |
a1f55fb
to
90a741b
Compare
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 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;"
|
Summary of changes
Pop()
method to the tainted objects map: to remove the tainted object from the map after we know that the stack pointer of theDefaultInterpolatedStringHandler
will be invalidConv_U()
to the ILReason 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)