Skip to content

Introduce Warm-up Phase for Dudect Measurement #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions dudect/fixture.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,20 @@ static bool doit(int mode)
bool ret = measure(before_ticks, after_ticks, input_data, mode);
differentiate(exec_times, before_ticks, after_ticks);
prepare_percentiles(exec_times, percentiles);
update_statistics(exec_times, classes, percentiles);
ret &= report();

/* This warm-up step discards the first measurement batch by skipping
* its statistical analysis. A static boolean flag controls this by
* marking the initial execution, ensuring only the first call within
* a test run is excluded from the t-test computation.
*/
static bool first_time = true;
if (first_time) {
first_time = false;
ret = true;
} else {
update_statistics(exec_times, classes, percentiles);
ret &= report();
}

free(before_ticks);
free(after_ticks);
Expand Down
Loading