File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -196,8 +196,20 @@ static bool doit(int mode)
196
196
bool ret = measure (before_ticks , after_ticks , input_data , mode );
197
197
differentiate (exec_times , before_ticks , after_ticks );
198
198
prepare_percentiles (exec_times , percentiles );
199
- update_statistics (exec_times , classes , percentiles );
200
- ret &= report ();
199
+
200
+ /* This warm-up step discards the first measurement batch by skipping
201
+ * its statistical analysis. A static boolean flag controls this by
202
+ * marking the initial execution, ensuring only the first call within
203
+ * a test run is excluded from the t-test computation.
204
+ */
205
+ static bool first_time = true;
206
+ if (first_time ) {
207
+ first_time = false;
208
+ ret = true;
209
+ } else {
210
+ update_statistics (exec_times , classes , percentiles );
211
+ ret &= report ();
212
+ }
201
213
202
214
free (before_ticks );
203
215
free (after_ticks );
You can’t perform that action at this time.
0 commit comments