-
Notifications
You must be signed in to change notification settings - Fork 140
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
[IAST] Add a mark to the modified instructions in IL dumps #5854
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 345809 Passed, 2225 Skipped, 24h 33m 27.18s 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 (5854) - mean (75ms) : 61, 90
. : milestone, 75,
master - mean (72ms) : 64, 81
. : milestone, 72,
section CallTarget+Inlining+NGEN
This PR (5854) - mean (1,064ms) : 1046, 1081
. : milestone, 1064,
master - mean (1,066ms) : 1046, 1086
. : milestone, 1066,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5854) - mean (109ms) : 104, 114
. : milestone, 109,
master - mean (108ms) : 105, 112
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (5854) - mean (750ms) : 728, 771
. : milestone, 750,
master - mean (745ms) : 728, 763
. : milestone, 745,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5854) - mean (92ms) : 88, 96
. : milestone, 92,
master - mean (91ms) : 88, 95
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (5854) - mean (700ms) : 678, 721
. : milestone, 700,
master - mean (697ms) : 680, 713
. : milestone, 697,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5854) - mean (193ms) : 189, 197
. : milestone, 193,
master - mean (192ms) : 188, 197
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5854) - mean (1,170ms) : 1144, 1196
. : milestone, 1170,
master - mean (1,169ms) : 1142, 1196
. : milestone, 1169,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5854) - mean (276ms) : 272, 281
. : milestone, 276,
master - mean (275ms) : 271, 279
. : milestone, 275,
section CallTarget+Inlining+NGEN
This PR (5854) - mean (923ms) : 902, 943
. : milestone, 923,
master - mean (919ms) : 898, 940
. : milestone, 919,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5854) - mean (266ms) : 263, 269
. : milestone, 266,
master - mean (266ms) : 261, 271
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (5854) - mean (905ms) : 883, 928
. : milestone, 905,
master - mean (905ms) : 875, 935
. : milestone, 905,
|
Benchmarks Report for appsec 🐌Benchmarks for #5854 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.StringConcatAspectBenchmark‑net6.0 | 254.2 KB | 266.53 KB | 12.33 KB | 4.85% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 58.9μs | 779ns | 7.67μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 61.5μs | 737ns | 7.25μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.5μs | 98.2ns | 354ns | 0 | 0 | 0 | 59.06 KB |
master | StringConcatAspectBenchmark |
net6.0 | 292μs | 5.72μs | 56.9μs | 0 | 0 | 0 | 254.2 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 310μs | 5.17μs | 51.2μs | 0 | 0 | 0 | 254.01 KB |
master | StringConcatAspectBenchmark |
net472 | 280μs | 6.22μs | 60.6μs | 0 | 0 | 0 | 278.53 KB |
#5854 | StringConcatBenchmark |
net6.0 | 51.9μs | 134ns | 482ns | 0 | 0 | 0 | 43.44 KB |
#5854 | StringConcatBenchmark |
netcoreapp3.1 | 56.5μs | 320ns | 2.12μs | 0 | 0 | 0 | 42.64 KB |
#5854 | StringConcatBenchmark |
net472 | 38.4μs | 121ns | 453ns | 0 | 0 | 0 | 59.12 KB |
#5854 | StringConcatAspectBenchmark |
net6.0 | 313μs | 1.69μs | 9.84μs | 0 | 0 | 0 | 266.53 KB |
#5854 | StringConcatAspectBenchmark |
netcoreapp3.1 | 332μs | 3.09μs | 30.4μs | 0 | 0 | 0 | 254.19 KB |
#5854 | StringConcatAspectBenchmark |
net472 | 297μs | 8.23μs | 79.3μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks Report for tracer 🐌Benchmarks for #5854 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 - Unknown 🤷 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 - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.135 | 1,100.91 | 1,249.39 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.1μs | 0.69ns | 2.67ns | 0.0138 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.52μs | 0.89ns | 3.45ns | 0.0129 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.48μs | 3.74ns | 14.5ns | 0.158 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.17μs | 0.661ns | 2.47ns | 0.0135 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.67μs | 0.921ns | 3.44ns | 0.0132 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.72μs | 3.46ns | 13.4ns | 0.167 | 0 | 0 | 1.05 KB |
#5854 | CallElasticsearch |
net6.0 | 1.25μs | 0.624ns | 2.34ns | 0.0138 | 0 | 0 | 976 B |
#5854 | CallElasticsearch |
netcoreapp3.1 | 1.5μs | 0.886ns | 3.31ns | 0.0134 | 0 | 0 | 976 B |
#5854 | CallElasticsearch |
net472 | 2.47μs | 1.93ns | 7.22ns | 0.158 | 0.00123 | 0 | 995 B |
#5854 | CallElasticsearchAsync |
net6.0 | 1.24μs | 0.635ns | 2.38ns | 0.0131 | 0 | 0 | 952 B |
#5854 | CallElasticsearchAsync |
netcoreapp3.1 | 1.56μs | 0.771ns | 2.88ns | 0.0134 | 0 | 0 | 1.02 KB |
#5854 | CallElasticsearchAsync |
net472 | 2.65μs | 2.7ns | 10.5ns | 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.25μs | 0.536ns | 2.01ns | 0.0131 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.64μs | 1.82ns | 6.8ns | 0.0123 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.72μs | 0.559ns | 2.17ns | 0.145 | 0 | 0 | 915 B |
#5854 | ExecuteAsync |
net6.0 | 1.36μs | 0.561ns | 2.17ns | 0.0136 | 0 | 0 | 952 B |
#5854 | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 0.727ns | 2.72ns | 0.0125 | 0 | 0 | 952 B |
#5854 | ExecuteAsync |
net472 | 1.78μs | 1.17ns | 4.21ns | 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.2μs | 1.91ns | 6.88ns | 0.0318 | 0 | 0 | 2.22 KB |
master | SendAsync |
netcoreapp3.1 | 5.09μs | 3.22ns | 12ns | 0.0357 | 0 | 0 | 2.76 KB |
master | SendAsync |
net472 | 7.71μs | 2.19ns | 8.48ns | 0.496 | 0 | 0 | 3.15 KB |
#5854 | SendAsync |
net6.0 | 4.17μs | 2.24ns | 8.66ns | 0.0318 | 0 | 0 | 2.22 KB |
#5854 | SendAsync |
netcoreapp3.1 | 5.37μs | 4.17ns | 16.2ns | 0.0378 | 0 | 0 | 2.76 KB |
#5854 | SendAsync |
net472 | 7.67μs | 1.7ns | 6.36ns | 0.499 | 0 | 0 | 3.15 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.58μs | 0.703ns | 2.72ns | 0.0227 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.09μs | 0.662ns | 2.39ns | 0.0215 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.69μs | 1.28ns | 4.95ns | 0.249 | 0 | 0 | 1.57 KB |
#5854 | EnrichedLog |
net6.0 | 1.45μs | 0.579ns | 2.09ns | 0.0228 | 0 | 0 | 1.64 KB |
#5854 | EnrichedLog |
netcoreapp3.1 | 2.16μs | 0.738ns | 2.66ns | 0.0226 | 0 | 0 | 1.64 KB |
#5854 | EnrichedLog |
net472 | 2.7μs | 1.34ns | 5.01ns | 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 | 114μs | 203ns | 786ns | 0.0565 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 119μs | 314ns | 1.22μs | 0.0592 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 147μs | 134ns | 518ns | 0.663 | 0.221 | 0 | 4.46 KB |
#5854 | EnrichedLog |
net6.0 | 113μs | 139ns | 539ns | 0.0566 | 0 | 0 | 4.28 KB |
#5854 | EnrichedLog |
netcoreapp3.1 | 118μs | 172ns | 666ns | 0.0596 | 0 | 0 | 4.28 KB |
#5854 | EnrichedLog |
net472 | 148μs | 176ns | 682ns | 0.662 | 0.221 | 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.11μs | 0.98ns | 3.67ns | 0.0311 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.24μs | 1.39ns | 5.2ns | 0.0298 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.69μs | 0.957ns | 3.71ns | 0.321 | 0 | 0 | 2.02 KB |
#5854 | EnrichedLog |
net6.0 | 3.17μs | 1.05ns | 4.07ns | 0.0301 | 0 | 0 | 2.2 KB |
#5854 | EnrichedLog |
netcoreapp3.1 | 4.01μs | 1.35ns | 5.04ns | 0.0279 | 0 | 0 | 2.2 KB |
#5854 | EnrichedLog |
net472 | 4.68μs | 1.59ns | 6.18ns | 0.319 | 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.43μs | 0.74ns | 2.77ns | 0.0163 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.7μs | 0.647ns | 2.51ns | 0.0152 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.06μs | 1.18ns | 4.55ns | 0.183 | 0.00103 | 0 | 1.16 KB |
#5854 | SendReceive |
net6.0 | 1.45μs | 1.01ns | 3.63ns | 0.0159 | 0 | 0 | 1.14 KB |
#5854 | SendReceive |
netcoreapp3.1 | 1.71μs | 0.669ns | 2.59ns | 0.0154 | 0 | 0 | 1.14 KB |
#5854 | SendReceive |
net472 | 2.15μs | 0.971ns | 3.76ns | 0.184 | 0.00107 | 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.73μs | 0.984ns | 3.68ns | 0.0218 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.86μs | 1.92ns | 7.17ns | 0.0213 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.47μs | 5.13ns | 19.9ns | 0.322 | 0 | 0 | 2.04 KB |
#5854 | EnrichedLog |
net6.0 | 2.67μs | 1.23ns | 4.75ns | 0.0226 | 0 | 0 | 1.6 KB |
#5854 | EnrichedLog |
netcoreapp3.1 | 3.98μs | 3.74ns | 14.5ns | 0.0219 | 0 | 0 | 1.65 KB |
#5854 | EnrichedLog |
net472 | 4.35μs | 2.57ns | 9.96ns | 0.323 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5854
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.152
403.11
464.44
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.152 | 403.11 | 464.44 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 403ns | 0.137ns | 0.511ns | 0.0081 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 610ns | 1.01ns | 3.89ns | 0.00766 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 664ns | 0.661ns | 2.56ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 496ns | 0.0885ns | 0.331ns | 0.00973 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 755ns | 0.391ns | 1.51ns | 0.00946 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 902ns | 1.23ns | 4.75ns | 0.104 | 0 | 0 | 658 B |
#5854 | StartFinishSpan |
net6.0 | 464ns | 0.414ns | 1.6ns | 0.008 | 0 | 0 | 576 B |
#5854 | StartFinishSpan |
netcoreapp3.1 | 624ns | 0.452ns | 1.75ns | 0.00783 | 0 | 0 | 576 B |
#5854 | StartFinishSpan |
net472 | 640ns | 0.65ns | 2.52ns | 0.0917 | 0 | 0 | 578 B |
#5854 | StartFinishScope |
net6.0 | 488ns | 0.973ns | 3.77ns | 0.00965 | 0 | 0 | 696 B |
#5854 | StartFinishScope |
netcoreapp3.1 | 741ns | 0.521ns | 2.02ns | 0.00927 | 0 | 0 | 696 B |
#5854 | StartFinishScope |
net472 | 932ns | 1.2ns | 4.65ns | 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 | 665ns | 0.496ns | 1.92ns | 0.0097 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 994ns | 0.912ns | 3.53ns | 0.00949 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.1μs | 0.315ns | 1.22ns | 0.105 | 0 | 0 | 658 B |
#5854 | RunOnMethodBegin |
net6.0 | 634ns | 0.794ns | 2.97ns | 0.00989 | 0 | 0 | 696 B |
#5854 | RunOnMethodBegin |
netcoreapp3.1 | 999ns | 0.522ns | 1.88ns | 0.00951 | 0 | 0 | 696 B |
#5854 | RunOnMethodBegin |
net472 | 1.09μs | 0.716ns | 2.68ns | 0.104 | 0 | 0 | 658 B |
## Summary of changes Add a marker * after the IL instruction OFFSET in Dataflow IL dumps ![image](https://github.com/user-attachments/assets/6cd6c007-5e48-4ce8-99a0-6b1d1d00d24e) Also, some not used code and useless logs have been removed ## Reason for change Sometimes modified instructions were difficult to locate in dumps present in the logs. ## Implementation details Identified new instructions with a flag instead of relaying on a negative offset as before, as this was lost in `rejit` situations ## Test coverage ## Other details <!-- Fixes #{issue} --> <!--⚠️ Note: where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. -->
…v2) (#5860) ## Summary of changes Add a marker * after the IL instruction OFFSET in Dataflow IL dumps ![image](https://github.com/user-attachments/assets/6cd6c007-5e48-4ce8-99a0-6b1d1d00d24e) Also, some not used code and useless logs have been removed ## Reason for change Sometimes modified instructions were difficult to locate in dumps present in the logs. ## Implementation details Identified new instructions with a flag instead of relaying on a negative offset as before, as this was lost in `rejit` situations
Summary of changes
Add a marker * after the IL instruction OFFSET in Dataflow IL dumps
Also, some not used code and useless logs have been removed
Reason for change
Sometimes modified instructions were difficult to locate in dumps present in the logs.
Implementation details
Identified new instructions with a flag instead of relaying on a negative offset as before, as this was lost in
rejit
situationsTest coverage
Other details