[Profiler] Add Reader/Writer Spinning mutex#8904
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1b0cf9cf4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8904) and master.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 189.99 ± (189.84 - 190.55) ms | 209.38 ± (208.96 - 209.82) ms | +10.2% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 193.93 ± (193.78 - 194.22) ms | 212.97 ± (212.64 - 213.39) ms | +9.8% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1161.36 ± (1161.38 - 1166.67) ms | 1262.67 ± (1262.74 - 1270.38) ms | +8.7% | ❌⬆️ |
Full Metrics Comparison
FakeDbCommand
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 73.96 ± (73.64 - 74.17) ms | 73.79 ± (73.74 - 74.33) ms | -0.2% | ✅ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 77.29 ± (77.49 - 78.01) ms | 75.63 ± (75.55 - 75.93) ms | -2.1% | ✅ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1082.70 ± (1083.61 - 1090.36) ms | 1088.24 ± (1088.83 - 1096.55) ms | +0.5% | ✅⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 22.32 ± (22.27 - 22.37) ms | 22.18 ± (22.14 - 22.22) ms | -0.6% | ✅ |
| process.time_to_main_ms | 84.40 ± (84.08 - 84.71) ms | 83.02 ± (82.70 - 83.34) ms | -1.6% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.00 ± (11.00 - 11.01) MB | 11.01 ± (11.00 - 11.01) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 12 ± (12 - 12) | 12 ± (12 - 12) | +0.0% | ✅ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 21.97 ± (21.95 - 22.00) ms | 21.98 ± (21.95 - 22.01) ms | +0.0% | ✅⬆️ |
| process.time_to_main_ms | 82.62 ± (82.44 - 82.80) ms | 82.53 ± (82.38 - 82.69) ms | -0.1% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.04 ± (11.04 - 11.04) MB | 11.05 ± (11.04 - 11.05) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 13 ± (13 - 13) | 13 ± (13 - 13) | +0.0% | ✅ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 209.66 ± (208.68 - 210.64) ms | 209.21 ± (208.41 - 210.01) ms | -0.2% | ✅ |
| process.time_to_main_ms | 533.20 ± (531.87 - 534.54) ms | 539.10 ± (537.95 - 540.25) ms | +1.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 49.48 ± (49.45 - 49.51) MB | 49.48 ± (49.45 - 49.51) MB | -0.0% | ✅ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | -0.1% | ✅ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 20.88 ± (20.85 - 20.91) ms | 21.24 ± (21.19 - 21.29) ms | +1.7% | ✅⬆️ |
| process.time_to_main_ms | 70.88 ± (70.74 - 71.01) ms | 74.58 ± (74.31 - 74.85) ms | +5.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.72 ± (10.72 - 10.73) MB | 10.73 ± (10.73 - 10.73) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 20.74 ± (20.72 - 20.77) ms | 20.86 ± (20.83 - 20.89) ms | +0.6% | ✅⬆️ |
| process.time_to_main_ms | 71.58 ± (71.46 - 71.70) ms | 72.49 ± (72.32 - 72.67) ms | +1.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.84 ± (10.84 - 10.85) MB | 10.85 ± (10.84 - 10.85) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 370.78 ± (368.38 - 373.17) ms | 370.97 ± (368.84 - 373.10) ms | +0.1% | ✅⬆️ |
| process.time_to_main_ms | 540.90 ± (539.89 - 541.92) ms | 543.58 ± (542.42 - 544.74) ms | +0.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 50.57 ± (50.55 - 50.59) MB | 50.55 ± (50.53 - 50.57) MB | -0.0% | ✅ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | -0.4% | ✅ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 19.37 ± (19.32 - 19.42) ms | 19.19 ± (19.16 - 19.23) ms | -0.9% | ✅ |
| process.time_to_main_ms | 72.33 ± (72.04 - 72.62) ms | 70.22 ± (70.11 - 70.34) ms | -2.9% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.73 ± (7.73 - 7.73) MB | 7.75 ± (7.75 - 7.76) MB | +0.3% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 19.21 ± (19.18 - 19.25) ms | 19.49 ± (19.44 - 19.55) ms | +1.5% | ✅⬆️ |
| process.time_to_main_ms | 72.94 ± (72.72 - 73.16) ms | 74.69 ± (74.39 - 74.98) ms | +2.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.79 ± (7.79 - 7.80) MB | 7.80 ± (7.80 - 7.81) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 299.08 ± (296.79 - 301.37) ms | 297.79 ± (295.40 - 300.17) ms | -0.4% | ✅ |
| process.time_to_main_ms | 491.15 ± (490.15 - 492.15) ms | 494.54 ± (493.50 - 495.58) ms | +0.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 37.95 ± (37.93 - 37.98) MB | 37.97 ± (37.95 - 38.00) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 27 ± (27 - 27) | 27 ± (27 - 27) | -0.2% | ✅ |
HttpMessageHandler
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 189.99 ± (189.84 - 190.55) ms | 209.38 ± (208.96 - 209.82) ms | +10.2% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 193.93 ± (193.78 - 194.22) ms | 212.97 ± (212.64 - 213.39) ms | +9.8% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1161.36 ± (1161.38 - 1166.67) ms | 1262.67 ± (1262.74 - 1270.38) ms | +8.7% | ❌⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 183.34 ± (183.07 - 183.61) ms | 201.80 ± (201.41 - 202.19) ms | +10.1% | ✅⬆️ |
| process.time_to_main_ms | 79.65 ± (79.46 - 79.84) ms | 88.96 ± (88.65 - 89.27) ms | +11.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.28 ± (16.23 - 16.34) MB | 16.12 ± (16.10 - 16.14) MB | -1.0% | ✅ |
| runtime.dotnet.threads.count | 20 ± (19 - 20) | 20 ± (20 - 20) | +1.2% | ✅⬆️ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 182.92 ± (182.66 - 183.18) ms | 202.09 ± (201.66 - 202.51) ms | +10.5% | ✅⬆️ |
| process.time_to_main_ms | 80.90 ± (80.83 - 80.97) ms | 90.55 ± (90.30 - 90.80) ms | +11.9% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.21 ± (16.10 - 16.31) MB | 16.15 ± (16.14 - 16.17) MB | -0.3% | ✅ |
| runtime.dotnet.threads.count | 20 ± (20 - 20) | 21 ± (21 - 21) | +3.3% | ✅⬆️ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 372.66 ± (371.38 - 373.95) ms | 398.89 ± (397.62 - 400.15) ms | +7.0% | ✅⬆️ |
| process.time_to_main_ms | 522.02 ± (521.26 - 522.79) ms | 566.14 ± (564.80 - 567.49) ms | +8.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 58.05 ± (58.00 - 58.10) MB | 59.87 ± (59.80 - 59.94) MB | +3.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 30 ± (30 - 30) | 30 ± (30 - 30) | +1.1% | ✅⬆️ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 187.45 ± (187.20 - 187.70) ms | 207.51 ± (206.96 - 208.07) ms | +10.7% | ✅⬆️ |
| process.time_to_main_ms | 69.92 ± (69.81 - 70.04) ms | 78.57 ± (78.32 - 78.83) ms | +12.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 15.67 ± (15.49 - 15.85) MB | 16.36 ± (16.33 - 16.38) MB | +4.4% | ✅⬆️ |
| runtime.dotnet.threads.count | 17 ± (17 - 18) | 20 ± (19 - 20) | +12.0% | ✅⬆️ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 186.62 ± (186.44 - 186.81) ms | 206.31 ± (205.90 - 206.72) ms | +10.6% | ✅⬆️ |
| process.time_to_main_ms | 70.74 ± (70.68 - 70.80) ms | 79.05 ± (78.78 - 79.32) ms | +11.8% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 15.57 ± (15.40 - 15.74) MB | 16.49 ± (16.46 - 16.51) MB | +5.9% | ✅⬆️ |
| runtime.dotnet.threads.count | 18 ± (18 - 19) | 21 ± (20 - 21) | +11.4% | ✅⬆️ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 580.43 ± (577.44 - 583.43) ms | 580.19 ± (577.87 - 582.51) ms | -0.0% | ✅ |
| process.time_to_main_ms | 529.24 ± (528.45 - 530.03) ms | 580.89 ± (579.71 - 582.07) ms | +9.8% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 61.46 ± (61.41 - 61.51) MB | 61.44 ± (61.37 - 61.51) MB | -0.0% | ✅ |
| runtime.dotnet.threads.count | 31 ± (31 - 31) | 31 ± (31 - 31) | +0.1% | ✅⬆️ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 185.32 ± (185.15 - 185.50) ms | 207.88 ± (207.40 - 208.35) ms | +12.2% | ✅⬆️ |
| process.time_to_main_ms | 69.06 ± (68.92 - 69.21) ms | 78.12 ± (77.87 - 78.37) ms | +13.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.82 ± (11.71 - 11.93) MB | 11.78 ± (11.76 - 11.80) MB | -0.3% | ✅ |
| runtime.dotnet.threads.count | 17 ± (17 - 18) | 19 ± (19 - 19) | +8.7% | ✅⬆️ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 184.55 ± (184.39 - 184.71) ms | 206.62 ± (206.17 - 207.08) ms | +12.0% | ✅⬆️ |
| process.time_to_main_ms | 70.19 ± (70.13 - 70.26) ms | 79.25 ± (79.00 - 79.50) ms | +12.9% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.59 ± (11.46 - 11.72) MB | 11.82 ± (11.80 - 11.85) MB | +2.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 18 ± (18 - 18) | 20 ± (20 - 20) | +10.3% | ✅⬆️ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 510.70 ± (508.30 - 513.10) ms | 520.13 ± (514.14 - 526.13) ms | +1.8% | ✅⬆️ |
| process.time_to_main_ms | 481.65 ± (481.03 - 482.27) ms | 529.39 ± (528.43 - 530.36) ms | +9.9% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 51.38 ± (51.34 - 51.41) MB | 51.40 ± (51.34 - 51.46) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 29 ± (29 - 29) | 30 ± (30 - 30) | +2.1% | ✅⬆️ |
Comparison explanation
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 highlighted in **red**. The following thresholds were used for comparing the execution times:
- Welch test with statistical test for significance of 5%
- Only results indicating a difference greater than 5% and 5 ms are considered.
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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8904) - mean (74ms) : 70, 79
master - mean (74ms) : 70, 78
section Bailout
This PR (8904) - mean (76ms) : 73, 78
master - mean (78ms) : 74, 82
section CallTarget+Inlining+NGEN
This PR (8904) - mean (1,093ms) : 1036, 1149
master - mean (1,087ms) : 1039, 1135
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 (8904) - mean (112ms) : 105, 120
master - mean (114ms) : 107, 121
section Bailout
This PR (8904) - mean (111ms) : 109, 113
master - mean (111ms) : 108, 115
section CallTarget+Inlining+NGEN
This PR (8904) - mean (786ms) : 763, 808
master - mean (781ms) : 757, 806
FakeDbCommand (.NET 6)
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8904) - mean (103ms) : 98, 108
master - mean (98ms) : 95, 101
section Bailout
This PR (8904) - mean (99ms) : 97, 102
master - mean (98ms) : 96, 100
section CallTarget+Inlining+NGEN
This PR (8904) - mean (944ms) : 902, 985
master - mean (942ms) : 900, 984
FakeDbCommand (.NET 8)
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8904) - mean (96ms) : 93, 99
master - mean (99ms) : 93, 105
section Bailout
This PR (8904) - mean (102ms) : 95, 109
master - mean (100ms) : 95, 105
section CallTarget+Inlining+NGEN
This PR (8904) - mean (823ms) : 782, 865
master - mean (819ms) : 785, 853
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 (8904) - mean (209ms) : 205, 214
master - mean (190ms) : 187, 194
section Bailout
This PR (8904) - mean (213ms) : crit, 209, 217
master - mean (194ms) : 192, 196
section CallTarget+Inlining+NGEN
This PR (8904) - mean (1,267ms) : crit, 1212, 1321
master - mean (1,164ms) : 1133, 1195
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 (8904) - mean (301ms) : 293, 309
master - mean (272ms) : 268, 276
section Bailout
This PR (8904) - mean (303ms) : crit, 295, 310
master - mean (272ms) : 270, 275
section CallTarget+Inlining+NGEN
This PR (8904) - mean (1,005ms) : crit, 974, 1037
master - mean (933ms) : 913, 954
HttpMessageHandler (.NET 6)
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8904) - mean (296ms) : 289, 303
master - mean (266ms) : 263, 269
section Bailout
This PR (8904) - mean (295ms) : crit, 289, 301
master - mean (266ms) : 263, 268
section CallTarget+Inlining+NGEN
This PR (8904) - mean (1,199ms) : 1159, 1239
master - mean (1,138ms) : 1093, 1183
HttpMessageHandler (.NET 8)
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8904) - mean (297ms) : 289, 305
master - mean (264ms) : 260, 267
section Bailout
This PR (8904) - mean (296ms) : crit, 290, 303
master - mean (264ms) : 262, 267
section CallTarget+Inlining+NGEN
This PR (8904) - mean (1,084ms) : crit, 994, 1173
master - mean (1,023ms) : 989, 1058
BenchmarksBenchmark execution time: 2026-07-17 14:01:25 Comparing candidate commit 75923f4 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 60 known flaky benchmarks, 66 flaky benchmarks without significant changes.
|
Summary of changes
Implement
ReaderWriterSpinningMutex.Reason for change
The goal is to replace the
std::shared_timed_mutexto makeManagedCodeCache::IsManagedsignal-safe.Implementation details
ReaderWriterSpinningMutexTest coverage
Other details