-
Notifications
You must be signed in to change notification settings - Fork 30
Ignore execution_time regressions when binaries have same hash #140
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
lukel97
wants to merge
5
commits into
llvm:main
Choose a base branch
from
lukel97:ignore_same_hash
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| """Adds a ignore_same_hash column to the sample fields table and sets it to | ||
| true for execution_time. | ||
|
|
||
| """ | ||
|
|
||
| from sqlalchemy import Column, Integer, update | ||
|
|
||
| from lnt.server.db.migrations.util import introspect_table | ||
| from lnt.server.db.util import add_column | ||
|
|
||
|
|
||
| def upgrade(engine): | ||
| ignore_same_hash = Column("ignore_same_hash", Integer, default=0) | ||
| add_column(engine, "TestSuiteSampleFields", ignore_same_hash) | ||
|
|
||
| test_suite_sample_fields = introspect_table(engine, "TestSuiteSampleFields") | ||
| set_init_value = update(test_suite_sample_fields).values(ignore_same_hash=0) | ||
| set_exec_time = ( | ||
| update(test_suite_sample_fields) | ||
| .where( | ||
| (test_suite_sample_fields.c.Name == "execution_time") | | ||
| (test_suite_sample_fields.c.Name == "score") | ||
| ) | ||
| .values(ignore_same_hash=1) | ||
| ) | ||
|
|
||
| with engine.begin() as trans: | ||
| trans.execute(set_init_value) | ||
| trans.execute(set_exec_time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,12 +16,14 @@ metrics: | |
| display_name: Execution Time | ||
| unit: seconds | ||
| unit_abbrev: s | ||
| ignore_same_hash: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we go with this, it should also be applied to score for consistency |
||
| - name: execution_status | ||
| type: Status | ||
| - name: score | ||
| type: Real | ||
| bigger_is_better: true | ||
| display_name: Score | ||
| ignore_same_hash: true | ||
| - name: mem_bytes | ||
| type: Real | ||
| display_name: Memory Usage | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about completely ignoring, if same binaries have changes it can be a good indication of the noise level, and changed binaries may also be impacted by the same noise. Not sure if that's possible, but it may be good to display the results for the binaries with same hash separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW LNT already detects noisy results based off the stddev and ignores them, the code for it is later on this function.
This also only affects when regressions are flagged, i.e. the Run-over-run changes detail > performance regressions - execution time" table at the top. You can still see the differences in the runs in the test results table below when you check "show all values", which will reveal the noisy tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to agree with @fhahn, I don't really understand why we'd ignore subsequent results entirely.
I also don't fully understand the impact of this change: for multi-valued runs (e.g. running the same program multiple times and submitting multiple execution times for it), what does this PR change, if anything? I'm not familiar with how
ComparisonResultis used, so that might be part of my confusion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is addressing a long standing FIXME, see above in the code.
LNT flags improvements and regressions when there is a significant change detected between runs. It still always saves all the results of each run and you can always still view them. This just determines what is flagged to the user in the regressions list, i.e. this page here: https://cc-perf.igalia.com/db_default/v4/nts/regressions/?state=0
It ignores changes that aren't significant or are likely noise, e.g. smaller than MIN_PERCENTAGE_CHANGE. For runs with multiple samples it also uses the standard deviation and the Mann-Whitney U test to ignore changes that are statistically likely to be noise.
LNT has always done this to remove false positives from the list of regressions. This list of regressions is what you read on a daily basis from the LNT reports that are sent out by email etc., so the regressions should be as actionable as possible.
Some noisy tests that are only slightly noisy still slip through the statistical checks, but given that the binary hasn't changed we shouldn't flag them as regressions. Here's an example from cc-perf.igalia.com, the colour of each run indicates the binary hash. The Equivalencing-flt binary hasn't changed over the past 7 runs, but there's 3 improvements detected in the green boxes. This PR would stop them from being flagged. It would however ensure that the improvements in miniFE above are still flagged, because the hashes are different.