Commit 3312405
committed
Fix incorrect DROP_SIZE usage
Previously, measure() only recorded timings for indices in the middle
range [DROP_SIZE, N_MEASURES - DROP_SIZE), while update_statistics()
assumed all entries were starting available from index 10. This
mismatch allowed zero-valued exec_times from unmeasured head and tail
indices to be included in the t-test, reducing sample means, inflating
variances, and suppressing the t-value, which may lead to
incorrect results or prevent detection thresholds from being reached.
After the fix, all samples are measured and
update_statistics() discards DROP_SIZE samples at both ends. This
ensures correct sample accounting, prevents overestimating the number
of measurements required, and avoids false negatives due to
uninitialized timing data.
Change-Id: Ibb1515043da5f56d72fe34fd5c78e2283df9a9931 parent 55065d7 commit 3312405
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments