Skip to content
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

Improve dudect test with cropped time analysis #280

Closed
wants to merge 1 commit into from

Conversation

BennyWang1007
Copy link

@BennyWang1007 BennyWang1007 commented Mar 20, 2025

The original dudect collect all execution times and perform t-tests,
which may be affected by outliers. The outliers could be caused by
context switches, interrupts, or other system activities. This patch
introduces percentile-based cropping to remove outliers.

The patch adds a new function "prepare_percentiles()" to compute
thresholds using an complementary exponential decay scale. The function
is called before the test starts.

The patch modifies "update_statistics()" to perform t-tests on cropped
execution times by filtering out the outliers.

Change-Id: Ieba005a990b122785ce931fe1364adf81dd9802a

@jserv jserv requested a review from eecheng87 March 20, 2025 22:40
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Check https://aeb.win.tue.nl/linux/lk/lk-8.html carefully:

Use the body to explain what and why vs. how

Don't put the bullets. Instead, use complete sentences.

dudect/fixture.c Outdated
@@ -74,6 +101,13 @@ static void update_statistics(const int64_t *exec_times, uint8_t *classes)

/* do a t-test on the execution time */
t_push(t, difference, classes[i]);

// t-test on cropped execution times, for several cropping thresholds.
Copy link
Contributor

Choose a reason for hiding this comment

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

Always use C-style comments.

return *a - *b;
}

static void prepare_percentiles(int64_t *exec_times, int64_t *percentiles)
Copy link
Contributor

Choose a reason for hiding this comment

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

Show mathematical evidences here.

The original dudect collect all execution times and perform t-tests,
which may be affected by outliers. The outliers could be caused by
context switches, interrupts, or other system activities. This patch
introduces percentile-based cropping to remove outliers.

The patch adds a new function "prepare_percentiles()" to compute
thresholds using an complementary exponential decay scale. The function
is called before the test starts.

The patch modifies "update_statistics()" to perform t-tests on cropped
execution times by filtering out the outliers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants