Skip to content

Conversation

@mohammedahmed18
Copy link
Contributor

@mohammedahmed18 mohammedahmed18 commented Dec 12, 2025

did some experiments for this with (optimize-me & docling), with the current values, I got

average accuracy: 99.8%
pytest plugin speedup: ~35–40%
stability achieved in ~70% of runs
Details
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 275 microseconds
best of all: 275 microseconds
==============================================
exp-1767018624.json
accuracy: 99.85%, breaked_at: 187 out of 223
time saved: 1.65 seconds
best before break: 3.58 milliseconds
best of all: 3.57 milliseconds
==============================================
exp-1767015798.json
accuracy: 99.66%, breaked_at: 58 out of 124
time saved: 5.33 seconds
best before break: 45.9 milliseconds
best of all: 45.8 milliseconds
==============================================
exp-1767008209.json
accuracy: 100.00%, breaked_at: 202 out of 216
time saved: 715 milliseconds
best before break: 702 microseconds
best of all: 702 microseconds
==============================================
exp-1767013781.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 61.4 microseconds
best of all: 61.4 microseconds
==============================================
exp-1767015752.json
accuracy: 99.90%, breaked_at: 167 out of 185
time saved: 1.01 seconds
best before break: 17.2 milliseconds
best of all: 17.2 milliseconds
==============================================
exp-1767013848.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 55.7 microseconds
best of all: 55.7 microseconds
==============================================
exp-1767018717.json
accuracy: 97.60%, breaked_at: 102 out of 218
time saved: 5.23 seconds
best before break: 3.69 milliseconds
best of all: 3.60 milliseconds
==============================================
exp-1767012613.json
accuracy: 99.97%, breaked_at: 212 out of 225
time saved: 557 milliseconds
best before break: 5.92 milliseconds
best of all: 5.92 milliseconds
==============================================
exp-1767012682.json
accuracy: 99.60%, breaked_at: 116 out of 218
time saved: 4.71 seconds
best before break: 6.13 milliseconds
best of all: 6.11 milliseconds
==============================================
exp-1767014901.json
accuracy: 99.93%, breaked_at: 163 out of 250
time saved: 3.19 seconds
best before break: 6.98 milliseconds
best of all: 6.97 milliseconds
==============================================
exp-1767020324.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.71 milliseconds
best of all: 1.71 milliseconds
==============================================
exp-1767010142.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 1.32 milliseconds
best of all: 1.31 milliseconds
==============================================
exp-1767014578.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 316 microseconds
best of all: 308 microseconds
==============================================
exp-1767020024.json
accuracy: 99.86%, breaked_at: 78 out of 159
time saved: 5.13 seconds
best before break: 17.9 milliseconds
best of all: 17.9 milliseconds
==============================================
exp-1767012424.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 35.7 microseconds
best of all: 35.6 microseconds
==============================================
exp-1767030095.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.79 seconds
best before break: 1.73 seconds
best of all: 1.73 seconds
==============================================
exp-1767011122.json
accuracy: 99.84%, breaked_at: 166 out of 250
time saved: 2.38 seconds
best before break: 1.96 milliseconds
best of all: 1.96 milliseconds
==============================================
exp-1767009209.json
accuracy: 99.81%, breaked_at: 178 out of 250
time saved: 2.77 seconds
best before break: 1.10 milliseconds
best of all: 1.10 milliseconds
==============================================
exp-1767008285.json
accuracy: NA%, breaked_at: -1 out of 206
time saved: 0.00 nanoseconds
best before break: 3.88 milliseconds
best of all: 3.88 milliseconds
==============================================
exp-1767011040.json
accuracy: 99.72%, breaked_at: 145 out of 250
time saved: 2.94 seconds
best before break: 1.84 milliseconds
best of all: 1.83 milliseconds
==============================================
exp-1767009878.json
accuracy: 100.00%, breaked_at: 227 out of 250
time saved: 712 milliseconds
best before break: 485 microseconds
best of all: 485 microseconds
==============================================
exp-1767020622.json
accuracy: 99.76%, breaked_at: 81 out of 168
time saved: 5.17 seconds
best before break: 17.1 milliseconds
best of all: 17.1 milliseconds
==============================================
exp-1767018987.json
accuracy: 99.93%, breaked_at: 24 out of 31
time saved: 2.29 seconds
best before break: 250 milliseconds
best of all: 250 milliseconds
==============================================
exp-1767017395.json
accuracy: 99.49%, breaked_at: 6 out of 11
time saved: 4.77 seconds
best before break: 4.43 milliseconds
best of all: 4.41 milliseconds
==============================================
exp-1767011828.json
accuracy: 99.94%, breaked_at: 191 out of 250
time saved: 1.63 seconds
best before break: 1.33 milliseconds
best of all: 1.32 milliseconds
==============================================
exp-1767020507.json
accuracy: 99.94%, breaked_at: 98 out of 169
time saved: 4.25 seconds
best before break: 16.8 milliseconds
best of all: 16.8 milliseconds
==============================================
exp-1767012014.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 301 microseconds
best of all: 301 microseconds
==============================================
exp-1767013398.json
accuracy: 99.98%, breaked_at: 26 out of 78
time saved: 6.66 seconds
best before break: 65.0 milliseconds
best of all: 65.0 milliseconds
==============================================
exp-1767012004.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 248 microseconds
best of all: 248 microseconds
==============================================
exp-1767018663.json
accuracy: 99.75%, breaked_at: 169 out of 223
time saved: 2.41 seconds
best before break: 3.48 milliseconds
best of all: 3.47 milliseconds
==============================================
exp-1767011918.json
accuracy: 99.94%, breaked_at: 223 out of 250
time saved: 702 milliseconds
best before break: 1.32 milliseconds
best of all: 1.32 milliseconds
==============================================
exp-1767011879.json
accuracy: 99.92%, breaked_at: 216 out of 250
time saved: 967 milliseconds
best before break: 1.78 milliseconds
best of all: 1.78 milliseconds
==============================================
exp-1767008862.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.65 milliseconds
best of all: 1.65 milliseconds
==============================================
exp-1767020428.json
accuracy: 99.98%, breaked_at: 117 out of 168
time saved: 3.07 seconds
best before break: 17.1 milliseconds
best of all: 17.1 milliseconds
==============================================
exp-1767011841.json
accuracy: 99.95%, breaked_at: 194 out of 250
time saved: 1.53 seconds
best before break: 1.36 milliseconds
best of all: 1.36 milliseconds
==============================================
exp-1767011360.json
accuracy: 99.87%, breaked_at: 16 out of 25
time saved: 3.59 seconds
best before break: 2.80 milliseconds
best of all: 2.80 milliseconds
==============================================
exp-1767011804.json
accuracy: 99.80%, breaked_at: 155 out of 250
time saved: 2.79 seconds
best before break: 2.19 milliseconds
best of all: 2.19 milliseconds
==============================================
exp-1767012025.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 260 microseconds
best of all: 260 microseconds
==============================================
exp-1767010484.json
accuracy: 99.98%, breaked_at: 32 out of 48
time saved: 3.38 seconds
best before break: 3.85 milliseconds
best of all: 3.85 milliseconds
==============================================
exp-1767014998.json
accuracy: 99.85%, breaked_at: 209 out of 250
time saved: 1.42 seconds
best before break: 5.84 milliseconds
best of all: 5.83 milliseconds
==============================================
exp-1767018930.json
accuracy: 99.93%, breaked_at: 18 out of 31
time saved: 4.29 seconds
best before break: 252 milliseconds
best of all: 252 milliseconds
==============================================
exp-1767008354.json
accuracy: NA%, breaked_at: -1 out of 216
time saved: 0.00 nanoseconds
best before break: 710 microseconds
best of all: 710 microseconds
==============================================
exp-1767018457.json
accuracy: NA%, breaked_at: -1 out of 86
time saved: 0.00 nanoseconds
best before break: 13.5 milliseconds
best of all: 13.5 milliseconds
==============================================
exp-1767008980.json
accuracy: 99.88%, breaked_at: 151 out of 245
time saved: 3.85 seconds
best before break: 983 microseconds
best of all: 982 microseconds
==============================================
exp-1767016605.json
accuracy: 99.96%, breaked_at: 108 out of 162
time saved: 3.33 seconds
best before break: 4.01 milliseconds
best of all: 4.01 milliseconds
==============================================
exp-1767008609.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 12.3 seconds
best of all: 12.3 seconds
==============================================
exp-1767020409.json
accuracy: 99.87%, breaked_at: 89 out of 168
time saved: 4.72 seconds
best before break: 17.0 milliseconds
best of all: 17.0 milliseconds
==============================================
exp-1767018766.json
accuracy: 99.99%, breaked_at: 216 out of 223
time saved: 300 milliseconds
best before break: 3.49 milliseconds
best of all: 3.49 milliseconds
==============================================
exp-1767012036.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 266 microseconds
best of all: 266 microseconds
==============================================
exp-1767014128.json
accuracy: 100.00%, breaked_at: 207 out of 250
time saved: 1.40 seconds
best before break: 1.12 milliseconds
best of all: 1.12 milliseconds
==============================================
exp-1767011891.json
accuracy: 99.93%, breaked_at: 190 out of 250
time saved: 1.66 seconds
best before break: 1.33 milliseconds
best of all: 1.33 milliseconds
==============================================
exp-1767013367.json
accuracy: 99.80%, breaked_at: 23 out of 65
time saved: 6.50 seconds
best before break: 80.3 milliseconds
best of all: 80.2 milliseconds
==============================================
exp-1767010910.json
accuracy: 99.94%, breaked_at: 13 out of 23
time saved: 4.52 seconds
best before break: 20.0 milliseconds
best of all: 20.0 milliseconds
==============================================
exp-1767008722.json
accuracy: 99.82%, breaked_at: 189 out of 250
time saved: 1.65 seconds
best before break: 454 microseconds
best of all: 453 microseconds
==============================================
exp-1767011632.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 3.45 seconds
best of all: 3.45 seconds
==============================================
exp-1767018220.json
accuracy: 99.99%, breaked_at: 89 out of 93
time saved: 424 milliseconds
best before break: 8.47 milliseconds
best of all: 8.46 milliseconds
==============================================
exp-1767030269.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.04 seconds
best of all: 2.04 seconds
==============================================
exp-1767009621.json
accuracy: 98.87%, breaked_at: 58 out of 102
time saved: 4.36 seconds
best before break: 2.66 milliseconds
best of all: 2.63 milliseconds
==============================================
exp-1767018784.json
accuracy: NA%, breaked_at: -1 out of 223
time saved: 0.00 nanoseconds
best before break: 3.50 milliseconds
best of all: 3.50 milliseconds
==============================================
exp-1767008747.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 440 microseconds
best of all: 440 microseconds
==============================================
exp-1767008247.json
accuracy: NA%, breaked_at: -1 out of 214
time saved: 0.00 nanoseconds
best before break: 738 microseconds
best of all: 738 microseconds
==============================================
exp-1767011387.json
accuracy: 99.77%, breaked_at: 21 out of 25
time saved: 1.59 seconds
best before break: 3.04 milliseconds
best of all: 3.04 milliseconds
==============================================
exp-1767008305.json
accuracy: 99.89%, breaked_at: 122 out of 202
time saved: 4.00 seconds
best before break: 3.89 milliseconds
best of all: 3.88 milliseconds
==============================================
exp-1767012597.json
accuracy: 99.75%, breaked_at: 145 out of 223
time saved: 3.50 seconds
best before break: 6.17 milliseconds
best of all: 6.15 milliseconds
==============================================
exp-1767014856.json
accuracy: 99.18%, breaked_at: 83 out of 211
time saved: 6.02 seconds
best before break: 15.0 milliseconds
best of all: 14.8 milliseconds
==============================================
exp-1767025477.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 161 milliseconds
best of all: 161 milliseconds
==============================================
exp-1767028218.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 179 milliseconds
best of all: 179 milliseconds
==============================================
exp-1767025023.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 189 milliseconds
best of all: 189 milliseconds
==============================================
exp-1767030500.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.03 seconds
best of all: 2.03 seconds
==============================================
exp-1767015738.json
accuracy: 99.77%, breaked_at: 105 out of 185
time saved: 4.33 seconds
best before break: 16.9 milliseconds
best of all: 16.9 milliseconds
==============================================
exp-1767030461.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.75 seconds
best before break: 1.69 seconds
best of all: 1.69 seconds
==============================================
exp-1767012057.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 255 microseconds
best of all: 255 microseconds
==============================================
exp-1767012355.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 35.0 microseconds
best of all: 34.6 microseconds
==============================================
exp-1767015014.json
accuracy: 99.92%, breaked_at: 242 out of 250
time saved: 289 milliseconds
best before break: 7.00 milliseconds
best of all: 6.99 milliseconds
==============================================
exp-1767011054.json
accuracy: 99.94%, breaked_at: 197 out of 250
time saved: 1.53 seconds
best before break: 2.23 milliseconds
best of all: 2.23 milliseconds
==============================================
exp-1767011329.json
accuracy: 99.64%, breaked_at: 18 out of 25
time saved: 2.80 seconds
best before break: 2.80 milliseconds
best of all: 2.79 milliseconds
==============================================
exp-1767020904.json
accuracy: 99.94%, breaked_at: 27 out of 67
time saved: 5.95 seconds
best before break: 122 milliseconds
best of all: 122 milliseconds
==============================================
exp-1767012752.json
accuracy: 100.00%, breaked_at: 210 out of 224
time saved: 603 milliseconds
best before break: 5.87 milliseconds
best of all: 5.87 milliseconds
==============================================
exp-1767014839.json
accuracy: 99.95%, breaked_at: 142 out of 207
time saved: 3.20 seconds
best before break: 15.7 milliseconds
best of all: 15.7 milliseconds
==============================================
exp-1767008879.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.64 milliseconds
best of all: 1.64 milliseconds
==============================================
exp-1767009191.json
accuracy: 99.88%, breaked_at: 185 out of 250
time saved: 2.57 seconds
best before break: 918 microseconds
best of all: 917 microseconds
==============================================
exp-1767019000.json
accuracy: 99.93%, breaked_at: 34 out of 73
time saved: 5.37 seconds
best before break: 85.3 milliseconds
best of all: 85.3 milliseconds
==============================================
exp-1767008194.json
accuracy: 99.95%, breaked_at: 48 out of 140
time saved: 6.55 seconds
best before break: 26.1 milliseconds
best of all: 26.1 milliseconds
==============================================
exp-1767012566.json
accuracy: 99.68%, breaked_at: 15 out of 35
time saved: 5.74 seconds
best before break: 242 milliseconds
best of all: 241 milliseconds
==============================================
exp-1767010259.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 1.23 milliseconds
best of all: 1.23 milliseconds
==============================================
exp-1767010808.json
accuracy: 99.87%, breaked_at: 12 out of 20
time saved: 4.06 seconds
best before break: 20.8 milliseconds
best of all: 20.8 milliseconds
==============================================
exp-1767012112.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 329 microseconds
best of all: 329 microseconds
==============================================
exp-1767011108.json
accuracy: 99.73%, breaked_at: 138 out of 250
time saved: 3.29 seconds
best before break: 2.48 milliseconds
best of all: 2.47 milliseconds
==============================================
exp-1767012252.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 36.0 microseconds
best of all: 35.8 microseconds
==============================================
exp-1767019996.json
accuracy: 99.92%, breaked_at: 12 out of 30
time saved: 6.05 seconds
best before break: 275 milliseconds
best of all: 275 milliseconds
==============================================
exp-1767013812.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 57.7 microseconds
best of all: 57.7 microseconds
==============================================
exp-1767010794.json
accuracy: 99.85%, breaked_at: 9 out of 18
time saved: 4.86 seconds
best before break: 55.4 milliseconds
best of all: 55.4 milliseconds
==============================================
exp-1767011816.json
accuracy: 99.94%, breaked_at: 208 out of 250
time saved: 1.19 seconds
best before break: 1.33 milliseconds
best of all: 1.33 milliseconds
==============================================
exp-1767012527.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 36.4 microseconds
best of all: 35.6 microseconds
==============================================
exp-1767008226.json
accuracy: 99.72%, breaked_at: 124 out of 200
time saved: 3.87 seconds
best before break: 3.89 milliseconds
best of all: 3.88 milliseconds
==============================================
exp-1767030171.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.78 seconds
best before break: 1.72 seconds
best of all: 1.72 seconds
==============================================
exp-1767013944.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 55.1 microseconds
best of all: 55.1 microseconds
==============================================
exp-1767015720.json
accuracy: 99.94%, breaked_at: 93 out of 195
time saved: 5.24 seconds
best before break: 14.5 milliseconds
best of all: 14.5 milliseconds
==============================================
exp-1767019060.json
accuracy: 99.97%, breaked_at: 134 out of 181
time saved: 2.57 seconds
best before break: 11.3 milliseconds
best of all: 11.3 milliseconds
==============================================
exp-1767012184.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 35.4 microseconds
best of all: 34.8 microseconds
==============================================
exp-1767030253.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.05 seconds
best of all: 2.05 seconds
==============================================
exp-1767020918.json
accuracy: 99.94%, breaked_at: 28 out of 79
time saved: 6.46 seconds
best before break: 99.2 milliseconds
best of all: 99.1 milliseconds
==============================================
exp-1767011866.json
accuracy: 99.97%, breaked_at: 219 out of 250
time saved: 827 milliseconds
best before break: 1.81 milliseconds
best of all: 1.81 milliseconds
==============================================
exp-1767012580.json
accuracy: NA%, breaked_at: -1 out of 220
time saved: 0.00 nanoseconds
best before break: 6.74 milliseconds
best of all: 6.74 milliseconds
==============================================
exp-1767030285.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.81 seconds
best before break: 1.76 seconds
best of all: 1.76 seconds
==============================================
exp-1767029303.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 158 milliseconds
best of all: 158 milliseconds
==============================================
exp-1767009731.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 35.3 microseconds
best of all: 35.3 microseconds
==============================================
exp-1767011030.json
accuracy: 99.25%, breaked_at: 48 out of 115
time saved: 5.83 seconds
best before break: 58.9 milliseconds
best of all: 58.5 milliseconds
==============================================
exp-1767014552.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 29.7 milliseconds
best of all: 29.6 milliseconds
==============================================
exp-1767015605.json
accuracy: 99.94%, breaked_at: 145 out of 219
time saved: 3.46 seconds
best before break: 10.8 milliseconds
best of all: 10.8 milliseconds
==============================================
exp-1767015030.json
accuracy: 99.44%, breaked_at: 138 out of 250
time saved: 4.25 seconds
best before break: 8.27 milliseconds
best of all: 8.22 milliseconds
==============================================
exp-1767026623.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 182 milliseconds
best of all: 181 milliseconds
==============================================
exp-1767009575.json
accuracy: 99.98%, breaked_at: 37 out of 89
time saved: 5.89 seconds
best before break: 15.5 milliseconds
best of all: 15.5 milliseconds
==============================================
exp-1767018479.json
accuracy: 99.98%, breaked_at: 78 out of 83
time saved: 600 milliseconds
best before break: 15.8 milliseconds
best of all: 15.8 milliseconds
==============================================
exp-1767018681.json
accuracy: NA%, breaked_at: -1 out of 223
time saved: 0.00 nanoseconds
best before break: 3.49 milliseconds
best of all: 3.49 milliseconds
==============================================
exp-1767015170.json
accuracy: 99.87%, breaked_at: 154 out of 250
time saved: 2.94 seconds
best before break: 3.97 milliseconds
best of all: 3.97 milliseconds
==============================================
exp-1767011219.json
accuracy: 99.98%, breaked_at: 199 out of 250
time saved: 1.44 seconds
best before break: 1.83 milliseconds
best of all: 1.83 milliseconds
==============================================
exp-1767020522.json
accuracy: 98.82%, breaked_at: 109 out of 168
time saved: 3.56 seconds
best before break: 17.1 milliseconds
best of all: 16.9 milliseconds
==============================================
exp-1767014113.json
accuracy: 99.89%, breaked_at: 182 out of 250
time saved: 2.21 seconds
best before break: 1.03 milliseconds
best of all: 1.03 milliseconds
==============================================
exp-1767009803.json
accuracy: 100.00%, breaked_at: 249 out of 250
time saved: 29.5 milliseconds
best before break: 453 microseconds
best of all: 453 microseconds
==============================================
exp-1767020637.json
accuracy: 99.78%, breaked_at: 74 out of 168
time saved: 5.60 seconds
best before break: 18.1 milliseconds
best of all: 18.1 milliseconds
==============================================
exp-1767020461.json
accuracy: 98.33%, breaked_at: 108 out of 168
time saved: 3.59 seconds
best before break: 17.3 milliseconds
best of all: 17.0 milliseconds
==============================================
exp-1767030209.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.80 seconds
best before break: 1.72 seconds
best of all: 1.72 seconds
==============================================
exp-1767030329.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.85 seconds
best before break: 1.78 seconds
best of all: 1.78 seconds
==============================================
exp-1767010230.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 1.33 milliseconds
best of all: 1.33 milliseconds
==============================================
exp-1767009895.json
accuracy: 99.79%, breaked_at: 203 out of 250
time saved: 1.50 seconds
best before break: 632 microseconds
best of all: 631 microseconds
==============================================
exp-1767010845.json
accuracy: 99.82%, breaked_at: 9 out of 20
time saved: 5.53 seconds
best before break: 20.8 milliseconds
best of all: 20.8 milliseconds
==============================================
exp-1767010501.json
accuracy: 99.98%, breaked_at: 31 out of 48
time saved: 3.61 seconds
best before break: 3.81 milliseconds
best of all: 3.81 milliseconds
==============================================
exp-1767009018.json
accuracy: 99.92%, breaked_at: 172 out of 250
time saved: 3.08 seconds
best before break: 1.08 milliseconds
best of all: 1.08 milliseconds
==============================================
exp-1767015888.json
accuracy: 99.76%, breaked_at: 139 out of 188
time saved: 2.60 seconds
best before break: 18.0 milliseconds
best of all: 17.9 milliseconds
==============================================
exp-1767012458.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 35.5 microseconds
best of all: 35.4 microseconds
==============================================
exp-1767009131.json
accuracy: 99.88%, breaked_at: 157 out of 249
time saved: 3.62 seconds
best before break: 1.07 milliseconds
best of all: 1.07 milliseconds
==============================================
exp-1767011149.json
accuracy: 99.96%, breaked_at: 167 out of 250
time saved: 2.32 seconds
best before break: 1.83 milliseconds
best of all: 1.83 milliseconds
==============================================
exp-1767009056.json
accuracy: 99.72%, breaked_at: 171 out of 248
time saved: 3.03 seconds
best before break: 1.12 milliseconds
best of all: 1.12 milliseconds
==============================================
exp-1767008322.json
accuracy: 99.99%, breaked_at: 163 out of 204
time saved: 2.00 seconds
best before break: 3.89 milliseconds
best of all: 3.89 milliseconds
==============================================
exp-1767012321.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 34.9 microseconds
best of all: 34.7 microseconds
==============================================
exp-1767009773.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 535 microseconds
best of all: 535 microseconds
==============================================
exp-1767009589.json
accuracy: 99.91%, breaked_at: 29 out of 79
time saved: 6.41 seconds
best before break: 28.9 milliseconds
best of all: 28.8 milliseconds
==============================================
exp-1767012890.json
accuracy: 99.91%, breaked_at: 87 out of 114
time saved: 2.42 seconds
best before break: 23.0 milliseconds
best of all: 23.0 milliseconds
==============================================
exp-1767028750.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 163 milliseconds
best of all: 163 milliseconds
==============================================
exp-1767008710.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 520 microseconds
best of all: 520 microseconds
==============================================
exp-1767016623.json
accuracy: 98.83%, breaked_at: 73 out of 162
time saved: 5.58 seconds
best before break: 4.03 milliseconds
best of all: 3.98 milliseconds
==============================================
exp-1767020952.json
accuracy: 99.97%, breaked_at: 28 out of 78
time saved: 6.40 seconds
best before break: 99.9 milliseconds
best of all: 99.9 milliseconds
==============================================
exp-1767009340.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.23 milliseconds
best of all: 1.23 milliseconds
==============================================
exp-1767017425.json
accuracy: NA%, breaked_at: -1 out of 11
time saved: 0.00 nanoseconds
best before break: 788 microseconds
best of all: 788 microseconds
==============================================
exp-1767013300.json
accuracy: 100.00%, breaked_at: 241 out of 250
time saved: 216 milliseconds
best before break: 1.66 milliseconds
best of all: 1.66 milliseconds
==============================================
exp-1767008999.json
accuracy: 99.86%, breaked_at: 206 out of 250
time saved: 1.77 seconds
best before break: 917 microseconds
best of all: 916 microseconds
==============================================
exp-1767027232.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 186 milliseconds
best of all: 186 milliseconds
==============================================
exp-1767030368.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.81 seconds
best before break: 1.75 seconds
best of all: 1.75 seconds
==============================================
exp-1767015622.json
accuracy: 95.85%, breaked_at: 102 out of 219
time saved: 5.37 seconds
best before break: 11.3 milliseconds
best of all: 10.8 milliseconds
==============================================
exp-1767030056.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.84 seconds
best before break: 1.77 seconds
best of all: 1.77 seconds
==============================================
exp-1767011232.json
accuracy: 99.96%, breaked_at: 208 out of 250
time saved: 1.21 seconds
best before break: 1.78 milliseconds
best of all: 1.78 milliseconds
==============================================
exp-1767013716.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 57.0 microseconds
best of all: 57.0 microseconds
==============================================
exp-1767011177.json
accuracy: 99.99%, breaked_at: 177 out of 250
time saved: 2.12 seconds
best before break: 2.28 milliseconds
best of all: 2.28 milliseconds
==============================================
exp-1767030133.json
accuracy: 100.00%, breaked_at: 5 out of 6
time saved: 1.79 seconds
best before break: 1.73 seconds
best of all: 1.73 seconds
==============================================
exp-1767012390.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 35.6 microseconds
best of all: 35.1 microseconds
==============================================
exp-1767011095.json
accuracy: 99.95%, breaked_at: 166 out of 250
time saved: 2.35 seconds
best before break: 1.84 milliseconds
best of all: 1.84 milliseconds
==============================================
exp-1767015665.json
accuracy: 99.83%, breaked_at: 98 out of 189
time saved: 4.83 seconds
best before break: 17.0 milliseconds
best of all: 16.9 milliseconds
==============================================
exp-1767009529.json
accuracy: 99.35%, breaked_at: 48 out of 99
time saved: 5.19 seconds
best before break: 4.00 milliseconds
best of all: 3.97 milliseconds
==============================================
exp-1767008735.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 512 microseconds
best of all: 512 microseconds
==============================================
exp-1767020553.json
accuracy: 99.98%, breaked_at: 136 out of 168
time saved: 1.94 seconds
best before break: 17.1 milliseconds
best of all: 17.1 milliseconds
==============================================
exp-1767020733.json
accuracy: 99.83%, breaked_at: 21 out of 60
time saved: 6.49 seconds
best before break: 137 milliseconds
best of all: 137 milliseconds
==============================================
exp-1767018418.json
accuracy: 99.97%, breaked_at: 54 out of 74
time saved: 2.75 seconds
best before break: 29.0 milliseconds
best of all: 29.0 milliseconds
==============================================
exp-1767014345.json
accuracy: 100.00%, breaked_at: 211 out of 250
time saved: 1.15 seconds
best before break: 888 microseconds
best of all: 888 microseconds
==============================================
exp-1767014745.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 2.76 milliseconds
best of all: 2.76 milliseconds
==============================================
exp-1767009543.json
accuracy: 100.00%, breaked_at: 61 out of 78
time saved: 2.21 seconds
best before break: 29.5 milliseconds
best of all: 29.5 milliseconds
==============================================
exp-1767019016.json
accuracy: 99.84%, breaked_at: 13 out of 31
time saved: 5.90 seconds
best before break: 248 milliseconds
best of all: 248 milliseconds
==============================================
exp-1767011316.json
accuracy: 99.86%, breaked_at: 18 out of 25
time saved: 2.80 seconds
best before break: 2.44 milliseconds
best of all: 2.43 milliseconds
==============================================
exp-1767010402.json
accuracy: 98.21%, breaked_at: 26 out of 51
time saved: 4.96 seconds
best before break: 3.83 milliseconds
best of all: 3.77 milliseconds
==============================================
exp-1767012699.json
accuracy: NA%, breaked_at: -1 out of 225
time saved: 0.00 nanoseconds
best before break: 5.91 milliseconds
best of all: 5.91 milliseconds
==============================================
exp-1767015824.json
accuracy: 99.44%, breaked_at: 84 out of 197
time saved: 5.69 seconds
best before break: 15.5 milliseconds
best of all: 15.4 milliseconds
==============================================
exp-1767012068.json
accuracy: 99.99%, breaked_at: 220 out of 250
time saved: 774 milliseconds
best before break: 401 microseconds
best of all: 401 microseconds
==============================================
exp-1767008268.json
accuracy: 99.88%, breaked_at: 145 out of 201
time saved: 2.80 seconds
best before break: 3.90 milliseconds
best of all: 3.89 milliseconds
==============================================
exp-1767010629.json
accuracy: 99.94%, breaked_at: 176 out of 250
time saved: 1.97 seconds
best before break: 453 microseconds
best of all: 453 microseconds
==============================================
exp-1767030429.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.04 seconds
best of all: 2.04 seconds
==============================================
exp-1767008847.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.68 milliseconds
best of all: 1.68 milliseconds
==============================================
exp-1767020875.json
accuracy: 99.98%, breaked_at: 33 out of 79
time saved: 5.86 seconds
best before break: 99.3 milliseconds
best of all: 99.3 milliseconds
==============================================
exp-1767022512.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 8.67 seconds
best of all: 8.67 seconds
==============================================
exp-1767012853.json
accuracy: 99.45%, breaked_at: 15 out of 31
time saved: 5.28 seconds
best before break: 257 milliseconds
best of all: 255 milliseconds
==============================================
exp-1767012089.json
accuracy: 99.99%, breaked_at: 222 out of 250
time saved: 782 milliseconds
best before break: 276 microseconds
best of all: 276 microseconds
==============================================
exp-1767012905.json
accuracy: 99.91%, breaked_at: 59 out of 113
time saved: 4.81 seconds
best before break: 22.7 milliseconds
best of all: 22.6 milliseconds
==============================================
exp-1767013076.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.03 seconds
best of all: 2.03 seconds
==============================================
exp-1767012665.json
accuracy: 99.73%, breaked_at: 179 out of 225
time saved: 2.08 seconds
best before break: 5.98 milliseconds
best of all: 5.97 milliseconds
==============================================
exp-1767010092.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 10.5 milliseconds
best of all: 10.5 milliseconds
==============================================
exp-1767012630.json
accuracy: 99.97%, breaked_at: 195 out of 219
time saved: 1.15 seconds
best before break: 6.82 milliseconds
best of all: 6.82 milliseconds
==============================================
exp-1767018438.json
accuracy: 99.97%, breaked_at: 24 out of 42
time saved: 4.37 seconds
best before break: 134 milliseconds
best of all: 134 milliseconds
==============================================
exp-1767011343.json
accuracy: 99.93%, breaked_at: 18 out of 25
time saved: 2.81 seconds
best before break: 2.86 milliseconds
best of all: 2.86 milliseconds
==============================================
exp-1767012962.json
accuracy: 99.96%, breaked_at: 84 out of 118
time saved: 2.90 seconds
best before break: 22.6 milliseconds
best of all: 22.5 milliseconds
==============================================
exp-1767011205.json
accuracy: 99.89%, breaked_at: 138 out of 250
time saved: 3.18 seconds
best before break: 1.83 milliseconds
best of all: 1.82 milliseconds
==============================================
exp-1767015538.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 24.1 seconds
best of all: 24.1 seconds
==============================================
exp-1767009959.json
accuracy: 99.99%, breaked_at: 241 out of 250
time saved: 265 milliseconds
best before break: 400 microseconds
best of all: 400 microseconds
==============================================
exp-1767014605.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 330 microseconds
best of all: 322 microseconds
==============================================
exp-1767014317.json
accuracy: 99.88%, breaked_at: 85 out of 126
time saved: 3.28 seconds
best before break: 50.7 milliseconds
best of all: 50.6 milliseconds
==============================================
exp-1767010926.json
accuracy: 99.87%, breaked_at: 15 out of 23
time saved: 3.63 seconds
best before break: 20.2 milliseconds
best of all: 20.1 milliseconds
==============================================
exp-1767009717.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 36.7 microseconds
best of all: 36.7 microseconds
==============================================
exp-1767015651.json
accuracy: 98.60%, breaked_at: 103 out of 215
time saved: 5.17 seconds
best before break: 12.2 milliseconds
best of all: 12.0 milliseconds
==============================================
exp-1767009486.json
accuracy: 100.00%, breaked_at: 71 out of 99
time saved: 2.91 seconds
best before break: 3.89 milliseconds
best of all: 3.89 milliseconds
==============================================
exp-1767009472.json
accuracy: 99.99%, breaked_at: 63 out of 99
time saved: 3.69 seconds
best before break: 4.05 milliseconds
best of all: 4.05 milliseconds
==============================================
exp-1767010727.json
accuracy: 99.99%, breaked_at: 23 out of 72
time saved: 6.82 seconds
best before break: 102 milliseconds
best of all: 102 milliseconds
==============================================
exp-1767020889.json
accuracy: 99.89%, breaked_at: 23 out of 62
time saved: 6.37 seconds
best before break: 136 milliseconds
best of all: 135 milliseconds
==============================================
exp-1767019935.json
accuracy: 99.85%, breaked_at: 12 out of 31
time saved: 6.21 seconds
best before break: 273 milliseconds
best of all: 273 milliseconds
==============================================
exp-1767011068.json
accuracy: 99.99%, breaked_at: 210 out of 250
time saved: 1.19 seconds
best before break: 2.26 milliseconds
best of all: 2.26 milliseconds
==============================================
exp-1767010463.json
accuracy: 99.97%, breaked_at: 38 out of 51
time saved: 2.58 seconds
best before break: 3.78 milliseconds
best of all: 3.78 milliseconds
==============================================
exp-1767015706.json
accuracy: 99.90%, breaked_at: 147 out of 205
time saved: 2.85 seconds
best before break: 13.4 milliseconds
best of all: 13.4 milliseconds
==============================================
exp-1767013562.json
accuracy: 99.92%, breaked_at: 155 out of 164
time saved: 620 milliseconds
best before break: 271 microseconds
best of all: 271 microseconds
==============================================
exp-1767011081.json
accuracy: 99.92%, breaked_at: 193 out of 250
time saved: 1.62 seconds
best before break: 1.81 milliseconds
best of all: 1.81 milliseconds
==============================================
exp-1767014161.json
accuracy: 99.82%, breaked_at: 109 out of 250
time saved: 4.60 seconds
best before break: 1.03 milliseconds
best of all: 1.03 milliseconds
==============================================
exp-1767010280.json
accuracy: 99.90%, breaked_at: 53 out of 125
time saved: 5.77 seconds
best before break: 2.34 milliseconds
best of all: 2.34 milliseconds
==============================================
exp-1767012493.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 36.9 microseconds
best of all: 36.2 microseconds
==============================================
exp-1767009357.json
accuracy: 99.94%, breaked_at: 163 out of 250
time saved: 3.51 seconds
best before break: 1.23 milliseconds
best of all: 1.23 milliseconds
==============================================
exp-1767011136.json
accuracy: 99.95%, breaked_at: 188 out of 250
time saved: 1.76 seconds
best before break: 1.81 milliseconds
best of all: 1.81 milliseconds
==============================================
exp-1767013449.json
accuracy: 99.99%, breaked_at: 25 out of 74
time saved: 6.67 seconds
best before break: 69.5 milliseconds
best of all: 69.5 milliseconds
==============================================
exp-1767020538.json
accuracy: 99.97%, breaked_at: 107 out of 156
time saved: 3.10 seconds
best before break: 22.2 milliseconds
best of all: 22.2 milliseconds
==============================================
exp-1767010862.json
accuracy: 99.82%, breaked_at: 9 out of 20
time saved: 5.54 seconds
best before break: 20.8 milliseconds
best of all: 20.8 milliseconds
==============================================
exp-1767010613.json
accuracy: 99.92%, breaked_at: 212 out of 250
time saved: 1.02 seconds
best before break: 389 microseconds
best of all: 389 microseconds
==============================================
exp-1767009112.json
accuracy: 99.73%, breaked_at: 136 out of 250
time saved: 4.50 seconds
best before break: 1.04 milliseconds
best of all: 1.04 milliseconds
==============================================
exp-1767019864.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 50.5 seconds
best of all: 50.5 seconds
==============================================
exp-1767020446.json
accuracy: 99.91%, breaked_at: 80 out of 192
time saved: 5.83 seconds
best before break: 11.8 milliseconds
best of all: 11.8 milliseconds
==============================================
exp-1767013262.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.66 milliseconds
best of all: 1.66 milliseconds
==============================================
exp-1767010894.json
accuracy: 99.90%, breaked_at: 12 out of 23
time saved: 5.01 seconds
best before break: 20.3 milliseconds
best of all: 20.2 milliseconds
==============================================
exp-1767013749.json
accuracy: 99.61%, breaked_at: 206 out of 250
time saved: 1.59 seconds
best before break: 57.5 microseconds
best of all: 57.3 microseconds
==============================================
exp-1767009374.json
accuracy: 99.99%, breaked_at: 226 out of 250
time saved: 906 milliseconds
best before break: 1.32 milliseconds
best of all: 1.32 milliseconds
==============================================
exp-1767012977.json
accuracy: 99.79%, breaked_at: 56 out of 120
time saved: 5.32 seconds
best before break: 21.9 milliseconds
best of all: 21.8 milliseconds
==============================================
exp-1767009309.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.30 milliseconds
best of all: 1.30 milliseconds
==============================================
exp-1767015193.json
accuracy: 99.94%, breaked_at: 165 out of 250
time saved: 2.50 seconds
best before break: 2.99 milliseconds
best of all: 2.99 milliseconds
==============================================
exp-1767014916.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 5.83 milliseconds
best of all: 5.83 milliseconds
==============================================
exp-1767018517.json
accuracy: 99.83%, breaked_at: 58 out of 84
time saved: 3.10 seconds
best before break: 15.5 milliseconds
best of all: 15.5 milliseconds
==============================================
exp-1767012648.json
accuracy: 99.98%, breaked_at: 203 out of 224
time saved: 906 milliseconds
best before break: 6.14 milliseconds
best of all: 6.14 milliseconds
==============================================
exp-1767011853.json
accuracy: 99.92%, breaked_at: 214 out of 250
time saved: 1.02 seconds
best before break: 1.36 milliseconds
best of all: 1.36 milliseconds
==============================================
exp-1767013913.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 62.4 microseconds
best of all: 62.4 microseconds
==============================================
exp-1767009975.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 401 microseconds
best of all: 401 microseconds
==============================================
exp-1767012218.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 36.0 microseconds
best of all: 35.7 microseconds
==============================================
exp-1767009787.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 471 microseconds
best of all: 471 microseconds
==============================================
exp-1767013109.json
accuracy: 99.98%, breaked_at: 67 out of 80
time saved: 1.64 seconds
best before break: 4.40 milliseconds
best of all: 4.40 milliseconds
==============================================
exp-1767020966.json
accuracy: 99.85%, breaked_at: 31 out of 78
time saved: 5.99 seconds
best before break: 100 milliseconds
best of all: 100 milliseconds
==============================================
exp-1767013683.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 57.4 microseconds
best of all: 57.4 microseconds
==============================================
exp-1767018748.json
accuracy: NA%, breaked_at: -1 out of 224
time saved: 0.00 nanoseconds
best before break: 3.51 milliseconds
best of all: 3.51 milliseconds
==============================================
exp-1767018971.json
accuracy: 99.99%, breaked_at: 108 out of 148
time saved: 2.78 seconds
best before break: 21.4 milliseconds
best of all: 21.4 milliseconds
==============================================
exp-1767009560.json
accuracy: 100.00%, breaked_at: 61 out of 101
time saved: 4.03 seconds
best before break: 3.05 milliseconds
best of all: 3.05 milliseconds
==============================================
exp-1767017409.json
accuracy: 99.67%, breaked_at: 9 out of 11
time saved: 1.93 seconds
best before break: 786 microseconds
best of all: 783 microseconds
==============================================
exp-1767014058.json
accuracy: 99.94%, breaked_at: 182 out of 250
time saved: 2.62 seconds
best before break: 5.84 milliseconds
best of all: 5.84 milliseconds
==============================================
exp-1767018868.json
accuracy: 99.93%, breaked_at: 11 out of 27
time saved: 6.07 seconds
best before break: 343 milliseconds
best of all: 343 milliseconds
==============================================
exp-1767012716.json
accuracy: 99.85%, breaked_at: 157 out of 224
time saved: 3.00 seconds
best before break: 6.60 milliseconds
best of all: 6.59 milliseconds
==============================================
exp-1767020860.json
accuracy: 99.96%, breaked_at: 32 out of 87
time saved: 6.33 seconds
best before break: 87.4 milliseconds
best of all: 87.3 milliseconds
==============================================
exp-1767010387.json
accuracy: NA%, breaked_at: -1 out of 48
time saved: 0.00 nanoseconds
best before break: 3.99 milliseconds
best of all: 3.99 milliseconds
==============================================
exp-1767009818.json
accuracy: 99.68%, breaked_at: 172 out of 250
time saved: 2.44 seconds
best before break: 733 microseconds
best of all: 730 microseconds
==============================================
exp-1767014886.json
accuracy: 98.75%, breaked_at: 94 out of 250
time saved: 5.83 seconds
best before break: 8.12 milliseconds
best of all: 8.02 milliseconds
==============================================
exp-1767013272.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.66 milliseconds
best of all: 1.66 milliseconds
==============================================
exp-1767009172.json
accuracy: 99.97%, breaked_at: 206 out of 250
time saved: 1.81 seconds
best before break: 1.04 milliseconds
best of all: 1.04 milliseconds
==============================================
exp-1767010113.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 1.25 milliseconds
best of all: 1.25 milliseconds
==============================================
exp-1767018172.json
accuracy: 99.86%, breaked_at: 22 out of 44
time saved: 5.08 seconds
best before break: 120 milliseconds
best of all: 120 milliseconds
==============================================
exp-1767020607.json
accuracy: 99.68%, breaked_at: 127 out of 168
time saved: 2.50 seconds
best before break: 17.0 milliseconds
best of all: 16.9 milliseconds
==============================================
exp-1767012079.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 255 microseconds
best of all: 255 microseconds
==============================================
exp-1767009093.json
accuracy: 99.68%, breaked_at: 118 out of 249
time saved: 5.20 seconds
best before break: 1.08 milliseconds
best of all: 1.08 milliseconds
==============================================
exp-1767026089.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 156 milliseconds
best of all: 156 milliseconds
==============================================
exp-1767014097.json
accuracy: 99.53%, breaked_at: 160 out of 250
time saved: 3.01 seconds
best before break: 1.09 milliseconds
best of all: 1.08 milliseconds
==============================================
exp-1767020590.json
accuracy: 99.78%, breaked_at: 91 out of 190
time saved: 5.20 seconds
best before break: 11.9 milliseconds
best of all: 11.9 milliseconds
==============================================
exp-1767014950.json
accuracy: 99.85%, breaked_at: 154 out of 190
time saved: 1.95 seconds
best before break: 19.4 milliseconds
best of all: 19.4 milliseconds
==============================================
exp-1767015156.json
accuracy: 99.99%, breaked_at: 158 out of 250
time saved: 2.73 seconds
best before break: 2.85 milliseconds
best of all: 2.85 milliseconds
==============================================
exp-1767015692.json
accuracy: 99.95%, breaked_at: 94 out of 206
time saved: 5.42 seconds
best before break: 20.0 milliseconds
best of all: 20.0 milliseconds
==============================================
exp-1767018403.json
accuracy: 99.89%, breaked_at: 18 out of 27
time saved: 3.43 seconds
best before break: 274 milliseconds
best of all: 273 milliseconds
==============================================
exp-1767030446.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.15 seconds
best of all: 2.15 seconds
==============================================
exp-1767016640.json
accuracy: 99.86%, breaked_at: 62 out of 160
time saved: 6.06 seconds
best before break: 4.01 milliseconds
best of all: 4.01 milliseconds
==============================================
exp-1767009832.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 485 microseconds
best of all: 485 microseconds
==============================================
exp-1767009847.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 494 microseconds
best of all: 494 microseconds
==============================================
exp-1767019029.json
accuracy: 99.88%, breaked_at: 12 out of 29
time saved: 5.86 seconds
best before break: 264 milliseconds
best of all: 263 milliseconds
==============================================
exp-1767013579.json
accuracy: NA%, breaked_at: -1 out of 163
time saved: 0.00 nanoseconds
best before break: 247 microseconds
best of all: 247 microseconds
==============================================
exp-1767014446.json
accuracy: 99.99%, breaked_at: 5 out of 10
time saved: 5.18 seconds
best before break: 944 milliseconds
best of all: 944 milliseconds
==============================================
exp-1767020833.json
accuracy: 99.91%, breaked_at: 30 out of 83
time saved: 6.40 seconds
best before break: 93.7 milliseconds
best of all: 93.6 milliseconds
==============================================
exp-1767020980.json
accuracy: 99.93%, breaked_at: 27 out of 79
time saved: 6.55 seconds
best before break: 99.4 milliseconds
best of all: 99.3 milliseconds
==============================================
exp-1767010422.json
accuracy: 99.95%, breaked_at: 34 out of 52
time saved: 3.48 seconds
best before break: 3.70 milliseconds
best of all: 3.70 milliseconds
==============================================
exp-1767015636.json
accuracy: 99.97%, breaked_at: 197 out of 218
time saved: 957 milliseconds
best before break: 10.7 milliseconds
best of all: 10.7 milliseconds
==============================================
exp-1767011373.json
accuracy: 99.60%, breaked_at: 18 out of 25
time saved: 2.80 seconds
best before break: 2.97 milliseconds
best of all: 2.95 milliseconds
==============================================
exp-1767015678.json
accuracy: 99.67%, breaked_at: 106 out of 191
time saved: 4.43 seconds
best before break: 17.3 milliseconds
best of all: 17.3 milliseconds
==============================================
exp-1767010826.json
accuracy: 99.76%, breaked_at: 8 out of 20
time saved: 6.08 seconds
best before break: 20.7 milliseconds
best of all: 20.6 milliseconds
==============================================
exp-1767015045.json
accuracy: 99.82%, breaked_at: 168 out of 250
time saved: 3.05 seconds
best before break: 7.91 milliseconds
best of all: 7.89 milliseconds
==============================================
exp-1767015208.json
accuracy: 99.98%, breaked_at: 154 out of 250
time saved: 2.96 seconds
best before break: 3.63 milliseconds
best of all: 3.63 milliseconds
==============================================
exp-1767008698.json
accuracy: 99.90%, breaked_at: 205 out of 250
time saved: 1.29 seconds
best before break: 481 microseconds
best of all: 481 microseconds
==============================================
exp-1767013881.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 69.4 microseconds
best of all: 69.4 microseconds
==============================================
exp-1767018643.json
accuracy: 99.91%, breaked_at: 179 out of 223
time saved: 1.99 seconds
best before break: 3.54 milliseconds
best of all: 3.54 milliseconds
==============================================
exp-1767018332.json
accuracy: 99.65%, breaked_at: 13 out of 29
time saved: 5.53 seconds
best before break: 299 milliseconds
best of all: 298 milliseconds
==============================================
exp-1767019979.json
accuracy: 99.91%, breaked_at: 84 out of 162
time saved: 4.80 seconds
best before break: 17.8 milliseconds
best of all: 17.7 milliseconds
==============================================
exp-1767018700.json
accuracy: 100.00%, breaked_at: 127 out of 150
time saved: 1.57 seconds
best before break: 24.3 milliseconds
best of all: 24.3 milliseconds
==============================================
exp-1767018953.json
accuracy: 99.91%, breaked_at: 154 out of 172
time saved: 1.03 seconds
best before break: 14.0 milliseconds
best of all: 14.0 milliseconds
==============================================
exp-1767016589.json
accuracy: 99.45%, breaked_at: 67 out of 151
time saved: 5.50 seconds
best before break: 7.54 milliseconds
best of all: 7.49 milliseconds
==============================================
exp-1767012286.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 36.1 microseconds
best of all: 35.2 microseconds
==============================================
exp-1767012769.json
accuracy: 99.88%, breaked_at: 174 out of 225
time saved: 2.29 seconds
best before break: 5.99 milliseconds
best of all: 5.99 milliseconds
==============================================
exp-1767009515.json
accuracy: 99.69%, breaked_at: 30 out of 89
time saved: 6.74 seconds
best before break: 14.7 milliseconds
best of all: 14.6 milliseconds
==============================================
exp-1767013203.json
accuracy: 100.00%, breaked_at: 47 out of 57
time saved: 1.82 seconds
best before break: 52.1 milliseconds
best of all: 52.1 milliseconds
==============================================
exp-1767013418.json
accuracy: 99.91%, breaked_at: 26 out of 77
time saved: 6.67 seconds
best before break: 66.7 milliseconds
best of all: 66.6 milliseconds
==============================================
exp-1767012046.json
accuracy: 99.98%, breaked_at: 243 out of 250
time saved: 177 milliseconds
best before break: 289 microseconds
best of all: 289 microseconds
==============================================
exp-1767010443.json
accuracy: 98.19%, breaked_at: 23 out of 51
time saved: 5.49 seconds
best before break: 3.85 milliseconds
best of all: 3.78 milliseconds
==============================================
exp-1767010172.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 1.32 milliseconds
best of all: 1.31 milliseconds
==============================================
exp-1767024487.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 160 milliseconds
best of all: 160 milliseconds
==============================================
exp-1767014255.json
accuracy: 100.00%, breaked_at: 5 out of 7
time saved: 2.86 seconds
best before break: 1.40 seconds
best of all: 1.40 seconds
==============================================
exp-1767009925.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 433 microseconds
best of all: 433 microseconds
==============================================
exp-1767014934.json
accuracy: 99.77%, breaked_at: 156 out of 250
time saved: 3.49 seconds
best before break: 7.05 milliseconds
best of all: 7.03 milliseconds
==============================================
exp-1767014871.json
accuracy: 99.85%, breaked_at: 187 out of 250
time saved: 2.33 seconds
best before break: 8.00 milliseconds
best of all: 7.99 milliseconds
==============================================
exp-1767013247.json
accuracy: 99.95%, breaked_at: 198 out of 250
time saved: 1.33 seconds
best before break: 1.74 milliseconds
best of all: 1.74 milliseconds
==============================================
exp-1767020818.json
accuracy: 99.99%, breaked_at: 5 out of 12
time saved: 6.14 seconds
best before break: 843 milliseconds
best of all: 843 milliseconds
==============================================
exp-1767011729.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 3.73 milliseconds
best of all: 3.72 milliseconds
==============================================
exp-1767012100.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 274 microseconds
best of all: 274 microseconds
==============================================
exp-1767015223.json
accuracy: 99.97%, breaked_at: 172 out of 250
time saved: 2.25 seconds
best before break: 3.01 milliseconds
best of all: 3.01 milliseconds
==============================================
exp-1767017442.json
accuracy: 99.65%, breaked_at: 9 out of 11
time saved: 1.83 seconds
best before break: 783 microseconds
best of all: 780 microseconds
==============================================
exp-1767020280.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 9.02 seconds
best of all: 9.02 seconds
==============================================
exp-1767023094.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 7.03 seconds
best of all: 7.03 seconds
==============================================
exp-1767020381.json
accuracy: 99.97%, breaked_at: 36 out of 77
time saved: 5.31 seconds
best before break: 86.3 milliseconds
best of all: 86.3 milliseconds
==============================================
exp-1767015144.json
accuracy: 99.85%, breaked_at: 152 out of 250
time saved: 3.07 seconds
best before break: 3.98 milliseconds
best of all: 3.97 milliseconds
==============================================
exp-1767018603.json
accuracy: 99.79%, breaked_at: 33 out of 72
time saved: 5.40 seconds
best before break: 95.0 milliseconds
best of all: 94.8 milliseconds
==============================================
exp-1767009074.json
accuracy: 99.97%, breaked_at: 189 out of 250
time saved: 2.43 seconds
best before break: 1.18 milliseconds
best of all: 1.18 milliseconds
==============================================
exp-1767020476.json
accuracy: 99.92%, breaked_at: 129 out of 168
time saved: 2.35 seconds
best before break: 17.1 milliseconds
best of all: 17.1 milliseconds
==============================================
exp-1767015249.json
accuracy: 99.90%, breaked_at: 147 out of 250
time saved: 3.02 seconds
best before break: 3.07 milliseconds
best of all: 3.07 milliseconds
==============================================
exp-1767021745.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 6.92 seconds
best of all: 6.92 seconds
==============================================
exp-1767009863.json
accuracy: 99.91%, breaked_at: 222 out of 250
time saved: 862 milliseconds
best before break: 749 microseconds
best of all: 748 microseconds
==============================================
exp-1767008832.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 5.00 milliseconds
best of all: 5.00 milliseconds
==============================================
exp-1767009037.json
accuracy: 99.80%, breaked_at: 147 out of 246
time saved: 4.09 seconds
best before break: 1.12 milliseconds
best of all: 1.12 milliseconds
==============================================
exp-1767009501.json
accuracy: 99.68%, breaked_at: 31 out of 87
time saved: 6.47 seconds
best before break: 15.4 milliseconds
best of all: 15.4 milliseconds
==============================================
exp-1767010603.json
accuracy: 99.82%, breaked_at: 31 out of 96
time saved: 6.74 seconds
best before break: 76.7 milliseconds
best of all: 76.6 milliseconds
==============================================
exp-1767014827.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.07 seconds
best of all: 2.07 seconds
==============================================
exp-1767030040.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 2.01 seconds
best of all: 2.01 seconds
==============================================
exp-1767029840.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 157 milliseconds
best of all: 157 milliseconds
==============================================
exp-1767024033.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 176 milliseconds
best of all: 176 milliseconds
==============================================
exp-1767027764.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 183 milliseconds
best of all: 183 milliseconds
==============================================
exp-1767011164.json
accuracy: 99.98%, breaked_at: 211 out of 250
time saved: 1.15 seconds
best before break: 2.21 milliseconds
best of all: 2.21 milliseconds
==============================================
exp-1767010201.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 1.28 milliseconds
best of all: 1.28 milliseconds
==============================================
exp-1767014651.json
accuracy: NA%, breaked_at: -1 out of 5
time saved: 0.00 nanoseconds
best before break: 140 microseconds
best of all: 139 microseconds
==============================================
exp-1767009227.json
accuracy: 99.87%, breaked_at: 186 out of 250
time saved: 2.54 seconds
best before break: 1.22 milliseconds
best of all: 1.21 milliseconds
==============================================
exp-1767020394.json
accuracy: 99.73%, breaked_at: 79 out of 168
time saved: 5.32 seconds
best before break: 17.1 milliseconds
best of all: 17.0 milliseconds
==============================================
exp-1767018248.json
accuracy: NA%, breaked_at: -1 out of 132
time saved: 0.00 nanoseconds
best before break: 8.31 milliseconds
best of all: 8.31 milliseconds
==============================================
exp-1767009324.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 1.24 milliseconds
best of all: 1.24 milliseconds
==============================================
exp-1767018191.json
accuracy: 99.90%, breaked_at: 93 out of 127
time saved: 2.70 seconds
best before break: 8.53 milliseconds
best of all: 8.53 milliseconds
==============================================
exp-1767009910.json
accuracy: NA%, breaked_at: -1 out of 250
time saved: 0.00 nanoseconds
best before break: 462 microseconds
best of all: 462 microseconds
==============================================
exp-1767008963.json
accuracy: 99.97%, breaked_at: 231 out of 248
time saved: 654 milliseconds
best before break: 1.34 milliseconds
best of all: 1.34 milliseconds
==============================================
exp-1767020491.json
accuracy: 99.97%, breaked_at: 106 out of 168
time saved: 3.67 seconds
best before break: 17.1 milliseconds
best of all: 17.1 milliseconds
==============================================

@github-actions
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Hardcoded Path

Writing a file to a hardcoded absolute path under the user's home directory can fail on different environments and pollutes user filesystems; consider using a temp dir, pytest's artifacts, or a configurable path and add error handling.

Path(f"/home/mohammed/Documents/test-results/break-{session.name}.txt").write_text(str(count))
break
Loop Timeout Logic

The updated loop no longer refreshes total_time within the loop and relies solely on timed_out/start_time; verify that SHORTEST_AMOUNT_OF_TIME and timed_out still guarantee at least one run and correct termination across configs.

while total_time >= SHORTEST_AMOUNT_OF_TIME:
    count += 1
    self.current_loop_durations_in_seconds.clear()

    for index, item in enumerate(session.items):
Zero-Duration Handling

Clearing durations when the total duration is zero may mask scenarios with flaky fast tests; consider tracking zeros explicitly or logging a reason to avoid unintended endless loops.

if total_duration_in_seconds > 0:
    durations.append(total_duration_in_seconds)
else:
    durations.clear()

@github-actions
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Remove hard-coded file path

Avoid writing to a hard-coded, user-specific absolute path which can fail on other
environments and introduces side effects during tests. Use a temp directory under
the pytest cache dir to persist optional diagnostics, and guard it behind a
debug/verbose flag.

codeflash/verification/pytest_plugin.py [348]

-Path(f"/home/mohammed/Documents/test-results/break-{session.name}.txt").write_text(str(count))
+if session.config.option.verbose > 1:
+    out_dir = Path(session.config.rootpath, ".pytest_cache", "codeflash")
+    out_dir.mkdir(parents=True, exist_ok=True)
+    (out_dir / f"break-{session.name}.txt").write_text(str(count))
Suggestion importance[1-10]: 8

__

Why: Replacing a hard-coded absolute path with a cache-directory path guarded by verbosity prevents environment-specific failures and unintended side effects, and the improved_code correctly reflects this change at the referenced line.

Medium
General
Preserve stability history across loops

Clearing durations on a zero-duration loop resets accumulated stability history and
can cause non-termination flaps under very fast tests. Instead, append zero and let
the consistency check handle zeros; only clear durations when test items were not
executed.

codeflash/verification/pytest_plugin.py [314-339]

 self.current_loop_durations_in_seconds.clear()
 ...
 total_duration_in_seconds = sum(self.current_loop_durations_in_seconds)
 
-if total_duration_in_seconds > 0:
+if session.items:
     durations.append(total_duration_in_seconds)
 else:
     durations.clear()
Suggestion importance[1-10]: 6

__

Why: The suggestion reasonably avoids clearing durations on zero totals to reduce flapping and updates logic in the correct region, though it slightly changes semantics and assumes session.items presence as the clearing condition.

Low
Harden consistency evaluation

Guard against division by zero and ensure dynamic_tolerance is only used with
positive avg; also handle NaN durations defensively. Short-circuit consistency
evaluation if any duration is non-finite.

codeflash/verification/pytest_plugin.py [312-353]

 while total_time >= SHORTEST_AMOUNT_OF_TIME:
     count += 1
     self.current_loop_durations_in_seconds.clear()
 ...
     if len(durations) == CONSISTENT_LOOP_COUNT:
-        avg = statistics.median(durations)
-        if avg == 0:
-            consistent = all(d == 0 for d in durations)
-        else:
-            consistent = all(abs(d - avg) / avg <= self.dynamic_tolerance(avg) for d in durations)
-        if consistent:
-            Path(f"/home/mohammed/Documents/test-results/break-{session.name}.txt").write_text(str(count))
-            break
+        if all((d == 0 or (d > 0 and d != float("inf"))) for d in durations):
+            avg = statistics.median(durations)
+            if avg <= 0:
+                consistent = all(d == 0 for d in durations)
+            else:
+                tol = self.dynamic_tolerance(avg)
+                consistent = all(abs(d - avg) / avg <= tol for d in durations if d >= 0)
+            if consistent:
+                if session.config.option.verbose > 1:
+                    out_dir = Path(session.config.rootpath, ".pytest_cache", "codeflash")
+                    out_dir.mkdir(parents=True, exist_ok=True)
+                    (out_dir / f"break-{session.name}.txt").write_text(str(count))
+                break
 
-    if self._timed_out(session, start_time, count):
-        break
-
Suggestion importance[1-10]: 5

__

Why: Adding guards for non-positive and non-finite durations is a defensive improvement and aligns with the surrounding code, but the original code already avoids divide-by-zero when avg == 0, so the impact is moderate.

Low

@mohammedahmed18 mohammedahmed18 requested review from KRRT7 and misrasaurabh1 and removed request for misrasaurabh1 December 12, 2025 04:13
@mohammedahmed18 mohammedahmed18 changed the title [Enhancement] Stop looping when runtime is stable [Enhancement] Stop looping when runtime is stable (CF-934) Dec 15, 2025
mohammedahmed18 and others added 9 commits December 15, 2025 20:17
The optimization achieves a **437% speedup** by eliminating expensive function calls and using more efficient algorithms for median calculation and min/max operations.

**Key optimizations applied:**

1. **Custom median calculation**: Replaced `statistics.median(recent)` with a custom implementation using `sorted(recent)` and direct indexing. This eliminates the overhead of the statistics module's generic median function.

2. **Reused sorted array**: The sorted array from median calculation is reused for min/max operations (`recent_sorted[0]`, `recent_sorted[-1]`) instead of calling `min(recent)` and `max(recent)` separately, eliminating redundant iterations.

3. **Replaced `statistics.mean()` calls**: Substituted `mean(recent[:half])` and `mean(recent[half:])` with direct `sum()/length` calculations, removing function call overhead.

4. **Early termination optimization**: Changed the `all()` generator expression to an explicit loop with early `break`, avoiding unnecessary iterations when the first non-conforming value is found.

**Performance impact analysis:**
The line profiler shows dramatic improvements in the most expensive operations:
- `first = mean(recent[:half])`: 2.07ms → 47.7μs (98% reduction)
- `second = mean(recent[half:])`: 1.54ms → 35.4μs (98% reduction)  
- `m = median(recent)`: 220μs → eliminated, replaced with ~55μs custom implementation

**Hot path significance:**
Based on the function reference, `should_stop()` is called in the main test loop (`pytest_runtestloop`) after every iteration to determine if benchmarking should continue. This makes it a critical hot path function where the 437% speedup directly translates to faster benchmark completion times.

**Test case performance:**
The optimization performs exceptionally well across all test scenarios, with speedups ranging from 400-500% for typical cases involving stable data, fluctuations, and large datasets. Even edge cases with insufficient data show 10-25% improvements.
@codeflash-ai
Copy link
Contributor

codeflash-ai bot commented Dec 22, 2025

⚡️ Codeflash found optimizations for this PR

📄 438% (4.38x) speedup for should_stop in codeflash/verification/pytest_plugin.py

⏱️ Runtime : 1.23 milliseconds 229 microseconds (best of 11 runs)

A dependent PR with the suggested changes has been created. Please review:

If you approve, it will be merged into this PR (branch exp/consistent-loop-break).

Static Badge

@codeflash-ai codeflash-ai deleted a comment from claude bot Dec 29, 2025
@codeflash-ai codeflash-ai deleted a comment from claude bot Dec 29, 2025
@codeflash-ai codeflash-ai deleted a comment from claude bot Dec 29, 2025
@codeflash-ai codeflash-ai deleted a comment from claude bot Dec 29, 2025
@codeflash-ai codeflash-ai deleted a comment from claude bot Dec 29, 2025
@codeflash-ai codeflash-ai deleted a comment from claude bot Dec 29, 2025
@aseembits93
Copy link
Contributor

@claude review this

@claude
Copy link

claude bot commented Dec 29, 2025

Claude finished @aseembits93's task in 3m 26s —— View job


Code Review Complete ✅

I've reviewed this PR and identified several issues that need attention, along with some positive observations.


Critical Issues 🔴

1. Type Hint Error in best_summed_runtime.py:1

def calculate_best_summed_runtime(grouped_runtime_info: dict[any, list[int]]) -> int:

Problem: any should be Any (capital A) and needs to be imported from typing.

Fix needed:

from typing import Any

def calculate_best_summed_runtime(grouped_runtime_info: dict[Any, list[int]]) -> int:

High Priority Issues 🟠

2. Logic Bug: runtimes List Assumption in pytest_plugin.py:318

# runtimes is already sorted descending
recent = runtimes[-window:]

Problem: The comment claims runtimes is "already sorted descending" but there's no code that sorts it. The list is built via runtimes.append(best_runtime_until_now) in line 405, maintaining insertion order, not sorted order.

Impact: The should_stop() function incorrectly assumes:

  • recent[0] is the max (line 331: r_max = recent[0])
  • recent[-1] is the min (line 332: r_min = recent[-1])

This will produce incorrect spread calculations and potentially never trigger the stability check.

Fix needed: Either sort the recent window or correct the min/max logic:

recent = runtimes[-window:]
r_max = max(recent)
r_min = min(recent)

3. Division by Zero Risk in pytest_plugin.py:326

if abs(r - m) / m > center_rel_tol:

Problem: If the median m is 0, this will raise ZeroDivisionError.

Fix needed:

if m == 0:
    centered = r == 0
else:
    centered = abs(r - m) / m <= center_rel_tol

Medium Priority Issues 🟡

4. Magic Numbers Need Documentation (addressed by reviewer questions)

The reviewers (@aseembits93) correctly questioned the magic numbers in lines 19-21:

STABILITY_WINDOW_SIZE = 0.35  # 35% of total window
STABILITY_CENTER_TOLERANCE = 0.0025  # ±0.25% around median
STABILITY_SPREAD_TOLERANCE = 0.0025  # 0.25% window spread

Recommendation: Add a comment block explaining:

  • How these values were determined (empirical testing? literature?)
  • Under what conditions they should be adjusted
  • What happens if they're too loose/strict

5. Potential Edge Case: Window Size Calculation in pytest_plugin.py:414

window_size = int(STABILITY_WINDOW_SIZE * estimated_total_loops + 0.5)
if (
    count >= session.config.option.codeflash_min_loops
    and window_size > 1
    and should_stop(runtimes, window_size)
):

Problem: If estimated_total_loops is very small (e.g., 2), then window_size could be 0 or 1, and the check window_size > 1 prevents the stability check. However, if estimated_total_loops grows later, the window may become too large for the available runtimes list.

Recommendation: Add bounds checking:

window_size = max(2, min(int(STABILITY_WINDOW_SIZE * estimated_total_loops + 0.5), len(runtimes)))

Low Priority / Style Issues 🔵

6. Inconsistent Import Ordering

The imports in pytest_plugin.py mix standard library and third-party imports without clear separation.

7. Code Duplication

The logic in calculate_best_summed_runtime() is identical to what was in models.py. This refactoring is good, but the function is extremely simple and could include better documentation about what "best summed runtime" means (appears to be: sum of minimum runtime for each test case).


Positive Observations ✅

  1. Good separation of concerns: Extracting calculate_best_summed_runtime() into its own module is good for reusability.

  2. Proper use of constants: Moving stability thresholds to config_consts.py is the right approach.

  3. Non-invasive feature: The stability check is opt-in via --codeflash_stability_check, which is good design.

  4. Efficient timing: Using perf_counter_ns() for loop timing is appropriate for high-resolution measurements.


Test Coverage Concerns ⚠️

The automated review noted "No relevant tests" - this is concerning for a stability detection feature. Consider adding:

  1. Unit tests for should_stop() with various runtime patterns
  2. Unit tests for get_runtime_from_stdout() with edge cases
  3. Integration tests verifying early loop termination works correctly

Summary Recommendations

Must Fix Before Merge:

  • Fix the type hint error (anyAny)
  • Fix the sorting assumption bug in should_stop()
  • Add division-by-zero protection

Should Fix:

  • Document the magic number rationale
  • Add bounds checking for window size
  • Add test coverage

Consider:

  • Import ordering cleanup
  • Enhanced documentation for calculate_best_summed_runtime()

raise FileNotFoundError(msg)

if should_make_copy:
file_path = path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related to this PR?

@@ -0,0 +1,2 @@
def calculate_best_summed_runtime(grouped_runtime_info: dict[any, list[int]]) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entire file for a single function 🥲

# 2) Window spread is small
r_max = recent[0]
r_min = recent[-1]
spread_ok = (r_max - r_min) / r_min <= spread_rel_tol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r_min could be 0?


while total_time >= SHORTEST_AMOUNT_OF_TIME: # need to run at least one for normal tests
count += 1
total_time = self._get_total_time(session)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see if total_time changes inside this loop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't, I checked


if self.enable_stability_check:
loop_end = _ORIGINAL_PERF_COUNTER_NS()
dt = loop_end - loop_start # nano-seconds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_ORIGINAL_PERF_COUNTER_NS() - loop_start


elapsed += dt

best_runtime_until_now = calculate_best_summed_runtime(self.usable_runtime_data_by_test_case)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does repeated work?

window_size = int(STABILITY_WINDOW_SIZE * estimated_total_loops + 0.5)
if (
count >= session.config.option.codeflash_min_loops
and window_size > 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove the check here


count: int = 0
runtimes = []
elapsed = 0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if elapsed is in ns then it's an int

@mohammedahmed18 mohammedahmed18 merged commit d2d57fe into main Dec 31, 2025
23 of 24 checks passed
@mohammedahmed18 mohammedahmed18 deleted the exp/consistent-loop-break branch December 31, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants