-
Notifications
You must be signed in to change notification settings - Fork 150
Avoid exceptions in ProcessBasicChecksTests #7781
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
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7781) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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 highlighted 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). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (74ms) : 69, 78
master - mean (75ms) : 68, 82
section Bailout
This PR (7781) - mean (79ms) : 74, 84
master - mean (79ms) : 74, 84
section CallTarget+Inlining+NGEN
This PR (7781) - mean (1,093ms) : 1034, 1152
master - mean (1,097ms) : 1039, 1155
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (116ms) : 109, 122
master - mean (118ms) : 110, 126
section Bailout
This PR (7781) - mean (117ms) : 109, 125
master - mean (118ms) : 113, 124
section CallTarget+Inlining+NGEN
This PR (7781) - mean (788ms) : 751, 825
master - mean (805ms) : 777, 834
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (103ms) : 95, 111
master - mean (104ms) : 98, 109
section Bailout
This PR (7781) - mean (103ms) : 97, 109
master - mean (105ms) : 99, 111
section CallTarget+Inlining+NGEN
This PR (7781) - mean (740ms) : 699, 781
master - mean (759ms) : 726, 792
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (101ms) : 95, 107
master - mean (103ms) : 95, 111
section Bailout
This PR (7781) - mean (102ms) : 97, 107
master - mean (103ms) : 98, 109
section CallTarget+Inlining+NGEN
This PR (7781) - mean (706ms) : 674, 738
master - mean (719ms) : 694, 744
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (195ms) : 190, 200
master - mean (191ms) : 188, 195
section Bailout
This PR (7781) - mean (196ms) : 193, 198
master - mean (195ms) : 191, 198
section CallTarget+Inlining+NGEN
This PR (7781) - mean (1,167ms) : 1099, 1235
master - mean (1,166ms) : 1090, 1241
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (277ms) : 272, 282
master - mean (275ms) : 269, 281
section Bailout
This PR (7781) - mean (277ms) : 273, 281
master - mean (275ms) : 271, 280
section CallTarget+Inlining+NGEN
This PR (7781) - mean (948ms) : 892, 1004
master - mean (943ms) : 904, 981
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (268ms) : 265, 271
master - mean (267ms) : 261, 273
section Bailout
This PR (7781) - mean (268ms) : 266, 271
master - mean (269ms) : 262, 276
section CallTarget+Inlining+NGEN
This PR (7781) - mean (914ms) : 873, 955
master - mean (925ms) : 878, 973
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (267ms) : 263, 272
master - mean (267ms) : 261, 272
section Bailout
This PR (7781) - mean (267ms) : 264, 270
master - mean (268ms) : 260, 275
section CallTarget+Inlining+NGEN
This PR (7781) - mean (848ms) : 829, 866
master - mean (849ms) : 822, 877
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7781 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 ✔️ Fewer allocations 🎉
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.11 KB | 6.01 KB | -103 B | -1.68% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 11.1μs | 56.6ns | 271ns | 0 | 0 | 0 | 5.51 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.6μs | 68.9ns | 308ns | 0 | 0 | 0 | 5.69 KB |
| master | StartStopWithChild |
net472 | 22.7μs | 130ns | 964ns | 0.957 | 0.319 | 0 | 6.11 KB |
| #7781 | StartStopWithChild |
net6.0 | 11μs | 59.9ns | 354ns | 0 | 0 | 0 | 5.51 KB |
| #7781 | StartStopWithChild |
netcoreapp3.1 | 14.4μs | 49.1ns | 190ns | 0 | 0 | 0 | 5.7 KB |
| #7781 | StartStopWithChild |
net472 | 22μs | 120ns | 729ns | 0.99 | 0.297 | 0.099 | 6.01 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.31 KB
3.35 KB
46 B
1.39%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 3.35 KB | 46 B | 1.39% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 935μs | 171ns | 618ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 158ns | 590ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 710ns | 2.75μs | 0 | 0 | 0 | 3.31 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net6.0 | 942μs | 1.13μs | 4.36μs | 0 | 0 | 0 | 2.71 KB |
| #7781 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.04ms | 338ns | 1.26μs | 0 | 0 | 0 | 2.7 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 339ns | 1.31μs | 0 | 0 | 0 | 3.35 KB |
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 | 1.08μs | 5.78ns | 32.2ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.38μs | 7.59ns | 48ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.05μs | 0.957ns | 3.58ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 6.98μs | 34.6ns | 158ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.98μs | 44.5ns | 199ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.58μs | 4.88ns | 18.9ns | 0.718 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 318ns | 1.66ns | 7.6ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 403ns | 2.15ns | 11.2ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 297ns | 0.025ns | 0.097ns | 0.0434 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.28μs | 29.4ns | 114ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.89μs | 30.3ns | 113ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 3.66ns | 14.2ns | 0.57 | 0 | 0 | 3.8 KB |
| #7781 | AllCycleSimpleBody |
net6.0 | 1.05μs | 6.22ns | 61.9ns | 0 | 0 | 0 | 1.22 KB |
| #7781 | AllCycleSimpleBody |
netcoreapp3.1 | 1.43μs | 2.25ns | 8.72ns | 0 | 0 | 0 | 1.2 KB |
| #7781 | AllCycleSimpleBody |
net472 | 1.02μs | 0.39ns | 1.46ns | 0.192 | 0 | 0 | 1.23 KB |
| #7781 | AllCycleMoreComplexBody |
net6.0 | 7.16μs | 33.5ns | 134ns | 0 | 0 | 0 | 4.72 KB |
| #7781 | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.96μs | 44.4ns | 203ns | 0 | 0 | 0 | 4.62 KB |
| #7781 | AllCycleMoreComplexBody |
net472 | 7.64μs | 3.08ns | 11.5ns | 0.725 | 0 | 0 | 4.74 KB |
| #7781 | ObjectExtractorSimpleBody |
net6.0 | 311ns | 1.79ns | 12.9ns | 0 | 0 | 0 | 280 B |
| #7781 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.18ns | 13.3ns | 0 | 0 | 0 | 272 B |
| #7781 | ObjectExtractorSimpleBody |
net472 | 302ns | 0.0191ns | 0.0687ns | 0.0441 | 0 | 0 | 281 B |
| #7781 | ObjectExtractorMoreComplexBody |
net6.0 | 6.4μs | 2.35ns | 9.08ns | 0 | 0 | 0 | 3.78 KB |
| #7781 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.73μs | 26.6ns | 103ns | 0 | 0 | 0 | 3.69 KB |
| #7781 | ObjectExtractorMoreComplexBody |
net472 | 6.71μs | 3.21ns | 12ns | 0.571 | 0 | 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 | 77.2μs | 296ns | 1.15μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 99.5μs | 429ns | 1.66μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 110μs | 17.8ns | 68.8ns | 4.93 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 143μs | 171ns | 663ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 156ns | 606ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 263μs | 121ns | 470ns | 0 | 0 | 0 | 2.16 KB |
| #7781 | EncodeArgs |
net6.0 | 77.1μs | 224ns | 867ns | 0 | 0 | 0 | 32.4 KB |
| #7781 | EncodeArgs |
netcoreapp3.1 | 98.1μs | 213ns | 824ns | 0 | 0 | 0 | 32.4 KB |
| #7781 | EncodeArgs |
net472 | 110μs | 32.5ns | 126ns | 4.95 | 0 | 0 | 32.51 KB |
| #7781 | EncodeLegacyArgs |
net6.0 | 144μs | 49.8ns | 193ns | 0 | 0 | 0 | 2.15 KB |
| #7781 | EncodeLegacyArgs |
netcoreapp3.1 | 209μs | 77.9ns | 291ns | 0 | 0 | 0 | 2.14 KB |
| #7781 | EncodeLegacyArgs |
net472 | 265μs | 128ns | 494ns | 0 | 0 | 0 | 2.16 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 | 393μs | 123ns | 476ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 424μs | 398ns | 1.54μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 430μs | 53.6ns | 208ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 283μs | 60.7ns | 235ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 304μs | 73ns | 283ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 71.6ns | 277ns | 0 | 0 | 0 | 2.29 KB |
| #7781 | RunWafRealisticBenchmark |
net6.0 | 397μs | 240ns | 897ns | 0 | 0 | 0 | 4.55 KB |
| #7781 | RunWafRealisticBenchmark |
netcoreapp3.1 | 411μs | 113ns | 406ns | 0 | 0 | 0 | 4.48 KB |
| #7781 | RunWafRealisticBenchmark |
net472 | 436μs | 68.1ns | 264ns | 0 | 0 | 0 | 4.66 KB |
| #7781 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 283μs | 38.3ns | 138ns | 0 | 0 | 0 | 2.24 KB |
| #7781 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 297μs | 135ns | 524ns | 0 | 0 | 0 | 2.22 KB |
| #7781 | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 34.9ns | 131ns | 0 | 0 | 0 | 2.29 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 | 61.9μs | 102ns | 381ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 70.8μs | 137ns | 493ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00303ns | 0.00128ns | 0.00495ns | 0 | 0 | 0 | 0 b |
| #7781 | SendRequest |
net6.0 | 61.3μs | 52.8ns | 190ns | 0 | 0 | 0 | 14.52 KB |
| #7781 | SendRequest |
netcoreapp3.1 | 70.6μs | 85ns | 306ns | 0 | 0 | 0 | 17.42 KB |
| #7781 | SendRequest |
net472 | 0.00521ns | 0.00184ns | 0.00711ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472
0 b
73 B
73 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472
0 b
47 B
47 B
∞
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
4 B
7 B
3 B
75.00%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 | 0 b | 73 B | 73 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 | 0 b | 47 B | 47 B | ∞ |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 4 B | 7 B | 3 B | 75.00% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.93ms | 1.87μs | 7.24μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.12ms | 1.16μs | 4.19μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.65ms | 170ns | 660ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.37ms | 69.3ns | 259ns | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.7ms | 2.5μs | 9.7μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 2.02ms | 245ns | 949ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 901μs | 24.6ns | 91.9ns | 0 | 0 | 0 | 3 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 821μs | 117ns | 453ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 74.6ns | 289ns | 0 | 0 | 0 | 0 b |
| #7781 | OriginalCharSlice |
net6.0 | 1.93ms | 5.6μs | 21.7μs | 0 | 0 | 0 | 640.01 KB |
| #7781 | OriginalCharSlice |
netcoreapp3.1 | 2.12ms | 5.33μs | 20.6μs | 0 | 0 | 0 | 640 KB |
| #7781 | OriginalCharSlice |
net472 | 2.57ms | 340ns | 1.27μs | 100 | 0 | 0 | 641.95 KB |
| #7781 | OptimizedCharSlice |
net6.0 | 1.45ms | 94.3ns | 365ns | 0 | 0 | 0 | 7 B |
| #7781 | OptimizedCharSlice |
netcoreapp3.1 | 1.69ms | 396ns | 1.53μs | 0 | 0 | 0 | 1 B |
| #7781 | OptimizedCharSlice |
net472 | 1.9ms | 215ns | 831ns | 0 | 0 | 0 | 73 B |
| #7781 | OptimizedCharSliceWithPool |
net6.0 | 832μs | 26.2ns | 101ns | 0 | 0 | 0 | 3 B |
| #7781 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 848μs | 119ns | 459ns | 0 | 0 | 0 | 1 B |
| #7781 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 60.2ns | 225ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7781
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.134
686,040.14
777,984.82
More allocations ⚠️ in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.71 KB
42.45 KB
743 B
1.78%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.88 KB
42.09 KB
211 B
0.50%
Fewer allocations 🎉 in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.49 KB
56.15 KB
-341 B
-0.60%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.134 | 686,040.14 | 777,984.82 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.71 KB | 42.45 KB | 743 B | 1.78% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.88 KB | 42.09 KB | 211 B | 0.50% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.49 KB | 56.15 KB | -341 B | -0.60% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 654μs | 3.22μs | 14.4μs | 0 | 0 | 0 | 41.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 686μs | 864ns | 3.23μs | 0 | 0 | 0 | 41.88 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 936μs | 3.51μs | 13.6μs | 8.33 | 0 | 0 | 56.49 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net6.0 | 724μs | 2.86μs | 10.7μs | 0 | 0 | 0 | 42.45 KB |
| #7781 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 756μs | 4.4μs | 41.5μs | 0 | 0 | 0 | 42.09 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net472 | 875μs | 3.55μs | 13.3μs | 8.33 | 0 | 0 | 56.15 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.97μs | 2.57ns | 9.95ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.66μs | 3.75ns | 14.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.91μs | 5.2ns | 20.2ns | 0.146 | 0.0146 | 0 | 987 B |
| #7781 | ExecuteNonQuery |
net6.0 | 1.88μs | 9ns | 38.2ns | 0 | 0 | 0 | 1.02 KB |
| #7781 | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 5.75ns | 22.3ns | 0 | 0 | 0 | 1.02 KB |
| #7781 | ExecuteNonQuery |
net472 | 2.87μs | 2.69ns | 10.4ns | 0.144 | 0.0144 | 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.66μs | 8.52ns | 40ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.21μs | 9.87ns | 38.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.61μs | 3.37ns | 12.6ns | 0.163 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.93μs | 4.94ns | 19.1ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.39μs | 10.8ns | 41.8ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.71μs | 6.48ns | 25.1ns | 0.165 | 0 | 0 | 1.1 KB |
| #7781 | CallElasticsearch |
net6.0 | 1.68μs | 0.929ns | 3.35ns | 0 | 0 | 0 | 1.03 KB |
| #7781 | CallElasticsearch |
netcoreapp3.1 | 2.15μs | 10.1ns | 40.4ns | 0 | 0 | 0 | 1.03 KB |
| #7781 | CallElasticsearch |
net472 | 3.52μs | 1.12ns | 4.19ns | 0.158 | 0 | 0 | 1.04 KB |
| #7781 | CallElasticsearchAsync |
net6.0 | 1.92μs | 3.23ns | 12.1ns | 0 | 0 | 0 | 1.01 KB |
| #7781 | CallElasticsearchAsync |
netcoreapp3.1 | 2.34μs | 8.52ns | 33ns | 0 | 0 | 0 | 1.08 KB |
| #7781 | CallElasticsearchAsync |
net472 | 3.66μs | 2.2ns | 8.52ns | 0.165 | 0 | 0 | 1.1 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.91μs | 7.12ns | 27.6ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.37μs | 9.45ns | 35.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.54μs | 0.933ns | 3.61ns | 0.139 | 0 | 0 | 915 B |
| #7781 | ExecuteAsync |
net6.0 | 1.89μs | 9.93ns | 48.6ns | 0 | 0 | 0 | 953 B |
| #7781 | ExecuteAsync |
netcoreapp3.1 | 2.34μs | 5.66ns | 21.2ns | 0 | 0 | 0 | 952 B |
| #7781 | ExecuteAsync |
net472 | 2.52μs | 1.31ns | 5.07ns | 0.139 | 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 | 7.14μs | 5.72ns | 22.1ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.43μs | 15.9ns | 61.4ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.3μs | 10.2ns | 38.3ns | 0.492 | 0 | 0 | 3.18 KB |
| #7781 | SendAsync |
net6.0 | 6.92μs | 5.9ns | 22.9ns | 0 | 0 | 0 | 2.36 KB |
| #7781 | SendAsync |
netcoreapp3.1 | 8.9μs | 22.3ns | 86.4ns | 0 | 0 | 0 | 2.9 KB |
| #7781 | SendAsync |
net472 | 12.1μs | 11.8ns | 45.9ns | 0.488 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
258.63 KB
275.03 KB
16.4 KB
6.34%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
256.22 KB
259.38 KB
3.17 KB
1.24%
Fewer allocations 🎉 in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
44.39 KB
43.18 KB
-1.22 KB
-2.74%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
286.72 KB
278.53 KB
-8.19 KB
-2.86%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
65.54 KB
57.34 KB
-8.19 KB
-12.50%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 258.63 KB | 275.03 KB | 16.4 KB | 6.34% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 256.22 KB | 259.38 KB | 3.17 KB | 1.24% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 44.39 KB | 43.18 KB | -1.22 KB | -2.74% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 286.72 KB | 278.53 KB | -8.19 KB | -2.86% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 65.54 KB | 57.34 KB | -8.19 KB | -12.50% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 49.4μs | 779ns | 7.72μs | 0 | 0 | 0 | 44.39 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.5μs | 271ns | 2.16μs | 0 | 0 | 0 | 42.83 KB |
| master | StringConcatBenchmark |
net472 | 57μs | 100ns | 348ns | 0 | 0 | 0 | 65.54 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 435μs | 1.38μs | 4.78μs | 0 | 0 | 0 | 256.22 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 507μs | 1.02μs | 4.43μs | 0 | 0 | 0 | 258.63 KB |
| master | StringConcatAspectBenchmark |
net472 | 400μs | 1.84μs | 7.12μs | 0 | 0 | 0 | 286.72 KB |
| #7781 | StringConcatBenchmark |
net6.0 | 42.5μs | 228ns | 1.16μs | 0 | 0 | 0 | 43.18 KB |
| #7781 | StringConcatBenchmark |
netcoreapp3.1 | 48.2μs | 269ns | 1.64μs | 0 | 0 | 0 | 42.64 KB |
| #7781 | StringConcatBenchmark |
net472 | 57.6μs | 110ns | 412ns | 0 | 0 | 0 | 57.34 KB |
| #7781 | StringConcatAspectBenchmark |
net6.0 | 464μs | 712ns | 2.47μs | 0 | 0 | 0 | 259.38 KB |
| #7781 | StringConcatAspectBenchmark |
netcoreapp3.1 | 519μs | 2.72μs | 13.3μs | 0 | 0 | 0 | 275.03 KB |
| #7781 | StringConcatAspectBenchmark |
net472 | 399μs | 2.27μs | 16.7μs | 0 | 0 | 0 | 278.53 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 | 2.58μs | 11.9ns | 47.6ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.61μs | 17.4ns | 75.9ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.98μs | 4.88ns | 18.9ns | 0.258 | 0 | 0 | 1.64 KB |
| #7781 | EnrichedLog |
net6.0 | 2.62μs | 9.86ns | 38.2ns | 0 | 0 | 0 | 1.7 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 3.62μs | 17.1ns | 63.9ns | 0 | 0 | 0 | 1.7 KB |
| #7781 | EnrichedLog |
net472 | 4.07μs | 6.54ns | 25.3ns | 0.243 | 0 | 0 | 1.64 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 | 123μs | 334ns | 1.29μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 128μs | 275ns | 990ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 173μs | 395ns | 1.53μs | 0 | 0 | 0 | 4.52 KB |
| #7781 | EnrichedLog |
net6.0 | 125μs | 160ns | 599ns | 0 | 0 | 0 | 4.31 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 129μs | 146ns | 546ns | 0 | 0 | 0 | 4.31 KB |
| #7781 | EnrichedLog |
net472 | 170μs | 301ns | 1.17μs | 0 | 0 | 0 | 4.52 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 | 5.3μs | 18ns | 69.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.74μs | 25.4ns | 98.2ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.57μs | 6.16ns | 23.9ns | 0.302 | 0 | 0 | 2.08 KB |
| #7781 | EnrichedLog |
net6.0 | 5.2μs | 19.6ns | 75.8ns | 0 | 0 | 0 | 2.26 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 7.11μs | 5.28ns | 20.4ns | 0 | 0 | 0 | 2.26 KB |
| #7781 | EnrichedLog |
net472 | 7.72μs | 5.36ns | 20.7ns | 0.311 | 0 | 0 | 2.08 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.94μs | 9.27ns | 35.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 11.5ns | 44.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.1μs | 1.85ns | 7.16ns | 0.184 | 0 | 0 | 1.2 KB |
| #7781 | SendReceive |
net6.0 | 1.99μs | 9.83ns | 44ns | 0 | 0 | 0 | 1.2 KB |
| #7781 | SendReceive |
netcoreapp3.1 | 2.61μs | 14.3ns | 82.1ns | 0 | 0 | 0 | 1.2 KB |
| #7781 | SendReceive |
net472 | 3.03μs | 0.527ns | 1.82ns | 0.183 | 0 | 0 | 1.2 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 | 4.35μs | 7.54ns | 29.2ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.65μs | 4.4ns | 15.9ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.56μs | 5.41ns | 21ns | 0.296 | 0 | 0 | 2.03 KB |
| #7781 | EnrichedLog |
net6.0 | 4.24μs | 8.82ns | 34.2ns | 0 | 0 | 0 | 1.58 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 5.52μs | 13.6ns | 51ns | 0 | 0 | 0 | 1.63 KB |
| #7781 | EnrichedLog |
net472 | 6.51μs | 13.5ns | 52.2ns | 0.321 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 783ns | 0.292ns | 1.09ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 961ns | 5.18ns | 29.3ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 933ns | 1.11ns | 4.29ns | 0.0893 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 904ns | 4.81ns | 25.5ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.21μs | 5.35ns | 20.7ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.12μs | 0.561ns | 2.17ns | 0.102 | 0 | 0 | 658 B |
| #7781 | StartFinishSpan |
net6.0 | 804ns | 3.78ns | 15.1ns | 0 | 0 | 0 | 576 B |
| #7781 | StartFinishSpan |
netcoreapp3.1 | 961ns | 4.84ns | 22.2ns | 0 | 0 | 0 | 576 B |
| #7781 | StartFinishSpan |
net472 | 962ns | 0.841ns | 3.26ns | 0.0876 | 0 | 0 | 578 B |
| #7781 | StartFinishScope |
net6.0 | 933ns | 4.64ns | 21.8ns | 0 | 0 | 0 | 696 B |
| #7781 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 6ns | 26.8ns | 0 | 0 | 0 | 696 B |
| #7781 | StartFinishScope |
net472 | 1.11μs | 0.557ns | 1.93ns | 0.101 | 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 | 1.06μs | 5.51ns | 28.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.46μs | 3.1ns | 12ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.46μs | 1.29ns | 4.82ns | 0.103 | 0 | 0 | 658 B |
| #7781 | RunOnMethodBegin |
net6.0 | 1.07μs | 0.816ns | 3.16ns | 0 | 0 | 0 | 696 B |
| #7781 | RunOnMethodBegin |
netcoreapp3.1 | 1.45μs | 7.25ns | 30.7ns | 0 | 0 | 0 | 696 B |
| #7781 | RunOnMethodBegin |
net472 | 1.54μs | 0.626ns | 2.34ns | 0.101 | 0 | 0 | 658 B |
| if (string.IsNullOrEmpty(corFlagsExe)) | ||
| // Use the absolute path as the key to track which executables have been modified | ||
| var executablePath = Path.GetFullPath(executable); | ||
| var lockObj = _corFlagsLocks.GetOrAdd(executablePath, _ => new object()); |
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.
nit: I think it's fine to have a single lock object that's used when applying the flags tbh, and to have a fast-path outside the lock that checks if they're already applied.
e.g.
private readonly object _lockObj = new();
//...
var executablePath = Path.GetFullPath(executable);
if (_corFlagsApplied.TryGetValue(executablePath, out _))
{
return;
}
// not applied
lock (_lockObj)
{
// check again to be safe
if (_corFlagsApplied.TryGetValue(executablePath, out _))
{
return;
}
// do the check
}That way we don't need a lock per executable, and we avoid taking the lock (and having that contention) every time we start an app? wdyt?
Another tiny thing is I wonder if we need to check that we've set CorFlags correctly i.e. 32 bit or 64 bit. I don't think so, because I think we only set that based on whether we run the whole test suite as 32bit or 64bit, is that correct?
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.
A single lock is more simple and the performance impact would be negligible. I will apply that. Thanks!
Yes, we don't need to check the corflags because the whole test suite would run either in x86 or x64
andrewlock
left a comment
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, thanks!
| .ToArray(); | ||
|
|
||
| private static readonly object _lockObj = new(); | ||
| private static readonly ConcurrentDictionary<string, bool> _corFlagsApplied = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase); |
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.
nit: should we ignore case 🤔 On Linux for example there could be two different samples with the same name, just different cases 😅 I don't think it's a problem in reality though
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.
Actually, we only change cor vars in Windows x86 net4, so I would keep it
Summary of changes
We are getting the following error in master:
The "Access is denied" error happens when trying to start the process. This suggests that:
of ConsoleTestHelper.cs
So the lock needs to protect not just the CorFlags modification, but also ensure the CorFlags.exe process has fully
released the file lock before another thread can use that executable.
This error have been observed under Windows, net4, x86, which makes sense based on the ProfilerHelper.SetCorFlags conditions:
Reason for change
Implementation details
Test coverage
Other details