-
Notifications
You must be signed in to change notification settings - Fork 151
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
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 (75ms) : 70, 79
master - mean (76ms) : 72, 81
section Bailout
This PR (7781) - mean (79ms) : 73, 85
master - mean (81ms) : 77, 86
section CallTarget+Inlining+NGEN
This PR (7781) - mean (1,115ms) : 1022, 1208
master - mean (1,124ms) : 1038, 1210
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 (117ms) : 110, 124
master - mean (120ms) : 112, 128
section Bailout
This PR (7781) - mean (119ms) : 113, 126
master - mean (120ms) : 112, 128
section CallTarget+Inlining+NGEN
This PR (7781) - mean (810ms) : 760, 859
master - mean (816ms) : 782, 849
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (105ms) : 97, 113
master - mean (105ms) : 100, 110
section Bailout
This PR (7781) - mean (104ms) : 99, 110
master - mean (107ms) : 101, 112
section CallTarget+Inlining+NGEN
This PR (7781) - mean (755ms) : 698, 813
master - mean (764ms) : 710, 819
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (102ms) : 97, 107
master - mean (103ms) : 98, 108
section Bailout
This PR (7781) - mean (104ms) : 99, 108
master - mean (105ms) : 100, 110
section CallTarget+Inlining+NGEN
This PR (7781) - mean (715ms) : 678, 751
master - mean (720ms) : 693, 747
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 (192ms) : 189, 195
master - mean (193ms) : 189, 197
section Bailout
This PR (7781) - mean (196ms) : 193, 200
master - mean (196ms) : 193, 200
section CallTarget+Inlining+NGEN
This PR (7781) - mean (1,164ms) : 1113, 1215
master - mean (1,171ms) : 1093, 1249
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 (276ms) : 271, 281
master - mean (277ms) : 272, 283
section Bailout
This PR (7781) - mean (277ms) : 273, 282
master - mean (277ms) : 274, 280
section CallTarget+Inlining+NGEN
This PR (7781) - mean (954ms) : 900, 1008
master - mean (948ms) : 905, 991
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (270ms) : 265, 276
master - mean (269ms) : 264, 275
section Bailout
This PR (7781) - mean (270ms) : 266, 274
master - mean (269ms) : 266, 272
section CallTarget+Inlining+NGEN
This PR (7781) - mean (936ms) : 881, 990
master - mean (928ms) : 884, 973
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7781) - mean (269ms) : 265, 274
master - mean (270ms) : 263, 276
section Bailout
This PR (7781) - mean (271ms) : 264, 277
master - mean (269ms) : 266, 273
section CallTarget+Inlining+NGEN
This PR (7781) - mean (848ms) : 831, 866
master - mean (856ms) : 837, 874
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 | 5.49 KB | 5.53 KB | 37 B | 0.67% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.06 KB | 5.99 KB | -62 B | -1.02% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.5μs | 59.9ns | 436ns | 0 | 0 | 0 | 5.49 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.3μs | 71.8ns | 400ns | 0 | 0 | 0 | 5.72 KB |
| master | StartStopWithChild |
net472 | 21.9μs | 123ns | 881ns | 0.896 | 0.224 | 0 | 6.06 KB |
| #7781 | StartStopWithChild |
net6.0 | 10.5μs | 58.1ns | 363ns | 0 | 0 | 0 | 5.53 KB |
| #7781 | StartStopWithChild |
netcoreapp3.1 | 13.8μs | 73ns | 365ns | 0 | 0 | 0 | 5.7 KB |
| #7781 | StartStopWithChild |
net472 | 22μs | 120ns | 732ns | 0.963 | 0.428 | 0.107 | 5.99 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 | 935μs | 181ns | 700ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 187ns | 723ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.23ms | 555ns | 2.15μs | 0 | 0 | 0 | 3.31 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net6.0 | 936μs | 223ns | 863ns | 0 | 0 | 0 | 2.71 KB |
| #7781 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.04ms | 217ns | 811ns | 0 | 0 | 0 | 2.7 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 153ns | 594ns | 0 | 0 | 0 | 3.31 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.04μs | 6.12ns | 60ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.44μs | 5.74ns | 21.5ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.03μs | 0.321ns | 1.2ns | 0.192 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.14μs | 34.9ns | 156ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.93μs | 41.4ns | 166ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.62μs | 3.99ns | 14.9ns | 0.725 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 324ns | 1.62ns | 7.24ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 395ns | 2.17ns | 13.4ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 299ns | 0.0309ns | 0.116ns | 0.0437 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.31μs | 33ns | 165ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 37.3ns | 149ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.75μs | 4.57ns | 17.7ns | 0.576 | 0 | 0 | 3.8 KB |
| #7781 | AllCycleSimpleBody |
net6.0 | 1.07μs | 5.58ns | 26.8ns | 0 | 0 | 0 | 1.22 KB |
| #7781 | AllCycleSimpleBody |
netcoreapp3.1 | 1.4μs | 7.52ns | 43.2ns | 0 | 0 | 0 | 1.2 KB |
| #7781 | AllCycleSimpleBody |
net472 | 1.06μs | 0.749ns | 2.9ns | 0.193 | 0 | 0 | 1.23 KB |
| #7781 | AllCycleMoreComplexBody |
net6.0 | 6.95μs | 38.1ns | 219ns | 0 | 0 | 0 | 4.72 KB |
| #7781 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.05μs | 46.7ns | 219ns | 0 | 0 | 0 | 4.62 KB |
| #7781 | AllCycleMoreComplexBody |
net472 | 7.64μs | 3.71ns | 13.9ns | 0.727 | 0 | 0 | 4.74 KB |
| #7781 | ObjectExtractorSimpleBody |
net6.0 | 315ns | 0.189ns | 0.734ns | 0 | 0 | 0 | 280 B |
| #7781 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 397ns | 2.19ns | 13.1ns | 0 | 0 | 0 | 272 B |
| #7781 | ObjectExtractorSimpleBody |
net472 | 298ns | 0.137ns | 0.531ns | 0.0434 | 0 | 0 | 281 B |
| #7781 | ObjectExtractorMoreComplexBody |
net6.0 | 6.3μs | 28.7ns | 111ns | 0 | 0 | 0 | 3.78 KB |
| #7781 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.89μs | 37.3ns | 149ns | 0 | 0 | 0 | 3.69 KB |
| #7781 | ObjectExtractorMoreComplexBody |
net472 | 6.75μs | 1.49ns | 5.56ns | 0.575 | 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 | 76.1μs | 299ns | 1.12μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 98.3μs | 218ns | 843ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 110μs | 166ns | 643ns | 4.98 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 148μs | 41ns | 153ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 196μs | 70.2ns | 272ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 264μs | 86.7ns | 336ns | 0 | 0 | 0 | 2.16 KB |
| #7781 | EncodeArgs |
net6.0 | 76.1μs | 291ns | 1.13μs | 0 | 0 | 0 | 32.4 KB |
| #7781 | EncodeArgs |
netcoreapp3.1 | 97.6μs | 257ns | 996ns | 0 | 0 | 0 | 32.4 KB |
| #7781 | EncodeArgs |
net472 | 110μs | 110ns | 425ns | 4.95 | 0 | 0 | 32.51 KB |
| #7781 | EncodeLegacyArgs |
net6.0 | 143μs | 84.1ns | 326ns | 0 | 0 | 0 | 2.14 KB |
| #7781 | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 150ns | 560ns | 0 | 0 | 0 | 2.14 KB |
| #7781 | EncodeLegacyArgs |
net472 | 267μs | 64.6ns | 250ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7781
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.399
307,801.09
738,455.38
several?
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.399 | 307,801.09 | 738,455.38 | several? |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 407μs | 159ns | 616ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 836μs | 13μs | 128μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 446μs | 57.8ns | 224ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 296μs | 33.8ns | 126ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 308μs | 189ns | 732ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 331μs | 42.5ns | 165ns | 0 | 0 | 0 | 2.29 KB |
| #7781 | RunWafRealisticBenchmark |
net6.0 | 391μs | 105ns | 408ns | 0 | 0 | 0 | 4.55 KB |
| #7781 | RunWafRealisticBenchmark |
netcoreapp3.1 | 815μs | 11.4μs | 113μs | 0 | 0 | 0 | 4.48 KB |
| #7781 | RunWafRealisticBenchmark |
net472 | 428μs | 36.1ns | 135ns | 0 | 0 | 0 | 4.66 KB |
| #7781 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 284μs | 88.5ns | 331ns | 0 | 0 | 0 | 2.24 KB |
| #7781 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 649μs | 13.1μs | 131μs | 0 | 0 | 0 | 2.22 KB |
| #7781 | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 36.1ns | 140ns | 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 | 60.8μs | 38.7ns | 145ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.6μs | 239ns | 861ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00857ns | 0.00228ns | 0.00882ns | 0 | 0 | 0 | 0 b |
| #7781 | SendRequest |
net6.0 | 62.2μs | 205ns | 896ns | 0 | 0 | 0 | 14.52 KB |
| #7781 | SendRequest |
netcoreapp3.1 | 70.3μs | 74.9ns | 280ns | 0 | 0 | 0 | 17.42 KB |
| #7781 | SendRequest |
net472 | 0.000959ns | 0.000721ns | 0.00279ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7781
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
1.164
809,319.23
942,121.15
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
48 B
48 B
∞
Fewer allocations 🎉 in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
4 B
-3 B
-42.86%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 1.164 | 809,319.23 | 942,121.15 |
| 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 | 48 B | 48 B | ∞ |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 4 B | -3 B | -42.86% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.93ms | 955ns | 3.57μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.12ms | 6.81μs | 25.5μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.62ms | 385ns | 1.44μs | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.39ms | 160ns | 599ns | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 396ns | 1.53μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.96ms | 219ns | 848ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 809μs | 32.2ns | 125ns | 0 | 0 | 0 | 3 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 804μs | 280ns | 1.05μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.17ms | 75.7ns | 283ns | 0 | 0 | 0 | 0 b |
| #7781 | OriginalCharSlice |
net6.0 | 1.93ms | 2.39μs | 9.27μs | 0 | 0 | 0 | 640.01 KB |
| #7781 | OriginalCharSlice |
netcoreapp3.1 | 2.17ms | 5.86μs | 21.1μs | 0 | 0 | 0 | 640 KB |
| #7781 | OriginalCharSlice |
net472 | 2.57ms | 168ns | 607ns | 100 | 0 | 0 | 641.95 KB |
| #7781 | OptimizedCharSlice |
net6.0 | 1.54ms | 2.79μs | 10.8μs | 0 | 0 | 0 | 4 B |
| #7781 | OptimizedCharSlice |
netcoreapp3.1 | 1.68ms | 288ns | 1.12μs | 0 | 0 | 0 | 1 B |
| #7781 | OptimizedCharSlice |
net472 | 1.97ms | 465ns | 1.8μs | 0 | 0 | 0 | 73 B |
| #7781 | OptimizedCharSliceWithPool |
net6.0 | 942μs | 49ns | 190ns | 0 | 0 | 0 | 3 B |
| #7781 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 809μs | 63.4ns | 245ns | 0 | 0 | 0 | 1 B |
| #7781 | OptimizedCharSliceWithPool |
net472 | 1.17ms | 84.9ns | 329ns | 0 | 0 | 0 | 48 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.75 KB
41.96 KB
210 B
0.50%
Fewer allocations 🎉 in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.56 KB
55.88 KB
-682 B
-1.21%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.22 KB
41.7 KB
-516 B
-1.22%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.75 KB | 41.96 KB | 210 B | 0.50% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.56 KB | 55.88 KB | -682 B | -1.21% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.22 KB | 41.7 KB | -516 B | -1.22% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 709μs | 2.9μs | 11.2μs | 0 | 0 | 0 | 42.22 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 748μs | 1.59μs | 6.94μs | 0 | 0 | 0 | 41.75 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 875μs | 4.4μs | 18.7μs | 8.33 | 0 | 0 | 56.56 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net6.0 | 699μs | 3.43μs | 14.5μs | 0 | 0 | 0 | 41.7 KB |
| #7781 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 764μs | 3.16μs | 12.2μs | 0 | 0 | 0 | 41.96 KB |
| #7781 | WriteAndFlushEnrichedTraces |
net472 | 883μs | 3.32μs | 12.9μs | 8.33 | 0 | 0 | 55.88 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.92μs | 7.57ns | 30.3ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.55μs | 12.4ns | 54ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.82μs | 4.2ns | 16.3ns | 0.156 | 0.0142 | 0 | 987 B |
| #7781 | ExecuteNonQuery |
net6.0 | 1.92μs | 2.17ns | 8.39ns | 0 | 0 | 0 | 1.02 KB |
| #7781 | ExecuteNonQuery |
netcoreapp3.1 | 2.66μs | 4.18ns | 16.2ns | 0 | 0 | 0 | 1.02 KB |
| #7781 | ExecuteNonQuery |
net472 | 2.91μs | 4.57ns | 17.7ns | 0.143 | 0.0143 | 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.74μs | 4.27ns | 16.5ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 10.3ns | 40ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.45μs | 2.8ns | 10.9ns | 0.156 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.91μs | 0.697ns | 2.51ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 1.02ns | 3.66ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.58μs | 1.94ns | 7.28ns | 0.161 | 0 | 0 | 1.1 KB |
| #7781 | CallElasticsearch |
net6.0 | 1.68μs | 8.33ns | 37.2ns | 0 | 0 | 0 | 1.03 KB |
| #7781 | CallElasticsearch |
netcoreapp3.1 | 2.23μs | 10.2ns | 38.3ns | 0 | 0 | 0 | 1.03 KB |
| #7781 | CallElasticsearch |
net472 | 3.56μs | 0.941ns | 3.39ns | 0.161 | 0 | 0 | 1.04 KB |
| #7781 | CallElasticsearchAsync |
net6.0 | 1.86μs | 9.35ns | 43.8ns | 0 | 0 | 0 | 1.01 KB |
| #7781 | CallElasticsearchAsync |
netcoreapp3.1 | 2.46μs | 7.62ns | 29.5ns | 0 | 0 | 0 | 1.08 KB |
| #7781 | CallElasticsearchAsync |
net472 | 3.7μs | 1.7ns | 6.38ns | 0.167 | 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.84μs | 3.2ns | 12.4ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.41μs | 7.43ns | 28.8ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.63μs | 2.03ns | 7.85ns | 0.145 | 0 | 0 | 915 B |
| #7781 | ExecuteAsync |
net6.0 | 1.89μs | 2.86ns | 11.1ns | 0 | 0 | 0 | 952 B |
| #7781 | ExecuteAsync |
netcoreapp3.1 | 2.52μs | 9.77ns | 37.8ns | 0 | 0 | 0 | 952 B |
| #7781 | ExecuteAsync |
net472 | 2.57μs | 1.24ns | 4.79ns | 0.141 | 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 | 6.83μs | 15ns | 58.3ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.83μs | 22.7ns | 87.8ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 11.9μs | 10.3ns | 40.1ns | 0.474 | 0 | 0 | 3.18 KB |
| #7781 | SendAsync |
net6.0 | 6.93μs | 17.9ns | 64.6ns | 0 | 0 | 0 | 2.36 KB |
| #7781 | SendAsync |
netcoreapp3.1 | 8.67μs | 22.5ns | 84.2ns | 0 | 0 | 0 | 2.9 KB |
| #7781 | SendAsync |
net472 | 12.4μs | 9.24ns | 35.8ns | 0.493 | 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.StringConcatBenchmark‑netcoreapp3.1
42.82 KB
44.14 KB
1.32 KB
3.08%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
256.72 KB
260.1 KB
3.38 KB
1.32%
Fewer allocations 🎉 in #7781
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
44.14 KB
43.78 KB
-368 B
-0.83%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
273.7 KB
257.95 KB
-15.75 KB
-5.76%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 42.82 KB | 44.14 KB | 1.32 KB | 3.08% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 256.72 KB | 260.1 KB | 3.38 KB | 1.32% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 44.14 KB | 43.78 KB | -368 B | -0.83% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 273.7 KB | 257.95 KB | -15.75 KB | -5.76% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 47μs | 358ns | 3.34μs | 0 | 0 | 0 | 44.14 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 58.1μs | 952ns | 9.47μs | 0 | 0 | 0 | 42.82 KB |
| master | StringConcatBenchmark |
net472 | 56.3μs | 280ns | 1.25μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 447μs | 1.25μs | 4.32μs | 0 | 0 | 0 | 256.72 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 554μs | 2.63μs | 10.8μs | 0 | 0 | 0 | 273.7 KB |
| master | StringConcatAspectBenchmark |
net472 | 405μs | 2.21μs | 12.1μs | 0 | 0 | 0 | 277.8 KB |
| #7781 | StringConcatBenchmark |
net6.0 | 46.1μs | 273ns | 2.62μs | 0 | 0 | 0 | 43.78 KB |
| #7781 | StringConcatBenchmark |
netcoreapp3.1 | 50.4μs | 573ns | 5.5μs | 0 | 0 | 0 | 44.14 KB |
| #7781 | StringConcatBenchmark |
net472 | 56.9μs | 239ns | 924ns | 0 | 0 | 0 | 57.34 KB |
| #7781 | StringConcatAspectBenchmark |
net6.0 | 468μs | 1.98μs | 9.09μs | 0 | 0 | 0 | 260.1 KB |
| #7781 | StringConcatAspectBenchmark |
netcoreapp3.1 | 502μs | 2.47μs | 10.2μs | 0 | 0 | 0 | 257.95 KB |
| #7781 | StringConcatAspectBenchmark |
net472 | 398μs | 2.13μs | 16μ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 | 13ns | 61.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.64μs | 17.3ns | 69.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.85μs | 3.18ns | 12.3ns | 0.249 | 0 | 0 | 1.64 KB |
| #7781 | EnrichedLog |
net6.0 | 2.68μs | 12.9ns | 53.2ns | 0 | 0 | 0 | 1.7 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 3.74μs | 17.9ns | 69.2ns | 0 | 0 | 0 | 1.7 KB |
| #7781 | EnrichedLog |
net472 | 4.02μs | 7.69ns | 29.8ns | 0.242 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #7781
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑netcoreapp3.1
1.120
141,289.13
126,140.31
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑netcoreapp3.1 | 1.120 | 141,289.13 | 126,140.31 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 131μs | 673ns | 3.16μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 141μs | 637ns | 2.47μs | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 181μs | 892ns | 3.78μs | 0 | 0 | 0 | 4.52 KB |
| #7781 | EnrichedLog |
net6.0 | 123μs | 39.4ns | 142ns | 0 | 0 | 0 | 4.31 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 126μs | 62.9ns | 227ns | 0 | 0 | 0 | 4.31 KB |
| #7781 | EnrichedLog |
net472 | 168μs | 128ns | 496ns | 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.06μs | 2.6ns | 9.71ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.78μs | 6.6ns | 25.5ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.56μs | 8.06ns | 31.2ns | 0.3 | 0 | 0 | 2.08 KB |
| #7781 | EnrichedLog |
net6.0 | 5.17μs | 5.41ns | 19.5ns | 0 | 0 | 0 | 2.26 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 6.9μs | 26.4ns | 102ns | 0 | 0 | 0 | 2.26 KB |
| #7781 | EnrichedLog |
net472 | 7.5μs | 7.48ns | 28ns | 0.3 | 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 | 2.01μs | 10.1ns | 43.9ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.68μs | 6.08ns | 23.6ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.02μs | 2.73ns | 10.6ns | 0.18 | 0 | 0 | 1.2 KB |
| #7781 | SendReceive |
net6.0 | 2.01μs | 9.24ns | 35.8ns | 0 | 0 | 0 | 1.2 KB |
| #7781 | SendReceive |
netcoreapp3.1 | 2.65μs | 13.1ns | 57ns | 0 | 0 | 0 | 1.2 KB |
| #7781 | SendReceive |
net472 | 3.18μs | 1.54ns | 5.98ns | 0.19 | 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.5μs | 21.5ns | 83.3ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.51μs | 13.7ns | 52.9ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.93μs | 9.31ns | 36.1ns | 0.309 | 0 | 0 | 2.03 KB |
| #7781 | EnrichedLog |
net6.0 | 4.36μs | 1.13ns | 4.39ns | 0 | 0 | 0 | 1.58 KB |
| #7781 | EnrichedLog |
netcoreapp3.1 | 5.63μs | 7.46ns | 27.9ns | 0 | 0 | 0 | 1.63 KB |
| #7781 | EnrichedLog |
net472 | 6.59μs | 6.32ns | 24.5ns | 0.295 | 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 | 772ns | 3.64ns | 15ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 959ns | 4.77ns | 21.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 949ns | 0.0993ns | 0.371ns | 0.0917 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 916ns | 1.69ns | 6.31ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.2μs | 6.11ns | 29.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.14μs | 0.215ns | 0.806ns | 0.103 | 0 | 0 | 658 B |
| #7781 | StartFinishSpan |
net6.0 | 791ns | 0.18ns | 0.673ns | 0 | 0 | 0 | 576 B |
| #7781 | StartFinishSpan |
netcoreapp3.1 | 973ns | 5.25ns | 27.8ns | 0 | 0 | 0 | 577 B |
| #7781 | StartFinishSpan |
net472 | 925ns | 0.422ns | 1.64ns | 0.0898 | 0 | 0 | 578 B |
| #7781 | StartFinishScope |
net6.0 | 943ns | 4.43ns | 18.3ns | 0 | 0 | 0 | 696 B |
| #7781 | StartFinishScope |
netcoreapp3.1 | 1.21μs | 6.41ns | 31.4ns | 0 | 0 | 0 | 696 B |
| #7781 | StartFinishScope |
net472 | 1.12μs | 0.403ns | 1.45ns | 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.05μs | 4.93ns | 20.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 7.32ns | 35.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.46μs | 2.39ns | 9.25ns | 0.102 | 0 | 0 | 658 B |
| #7781 | RunOnMethodBegin |
net6.0 | 1.08μs | 5.57ns | 25.5ns | 0 | 0 | 0 | 696 B |
| #7781 | RunOnMethodBegin |
netcoreapp3.1 | 1.41μs | 7.28ns | 34.9ns | 0 | 0 | 0 | 696 B |
| #7781 | RunOnMethodBegin |
net472 | 1.45μs | 1.08ns | 4.2ns | 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
| CreateNoWindow = true, | ||
| UseShellExecute = false | ||
| }; | ||
| var executedSuccessfully = Process.Start(opts).WaitForExit(20_000); |
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 we should dispose of the Process from Process.Start?
It was already like this though so 🤷
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.
Good point! I have modified the code. Even thought it was already like that, it's better to dispose it. Thanks!
|
Thanks for your feedback and reviews! |
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