diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-12-21 18:42:55 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-22 14:48:16 -0500 |
commit | ac3e8c52d4acb4fc8c52abe7a90d6dfdef642ccd (patch) | |
tree | aadd88b3b7a85eaebfe54905ad05ab9cbf90b8df /testsuite/driver | |
parent | 3ed909118126a93f03ef17fed52eaf602b91ae1b (diff) | |
download | haskell-ac3e8c52d4acb4fc8c52abe7a90d6dfdef642ccd.tar.gz |
perf ci: Start searching form the performance baseline
If you specify PERF_BASELINE_COMMIT then this can fail if the specific
commit you selected didn't have perf test metrics. (This can happen in
CI for example if a build fails on master).
Therefore instead of just reporting all tests as new, we start searching
downwards from this point to try and find a good commit to report
numbers from.
Diffstat (limited to 'testsuite/driver')
-rw-r--r-- | testsuite/driver/perf_notes.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index a320f22336..b21b0de977 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -432,9 +432,9 @@ def baseline_metric(commit: GitHash, assert is_commit_hash(commit) # Get all recent commit hashes. - commit_hashes = baseline_commit_log(commit) + commit_hashes = baseline_commit_log(commit_hash(baseline_ref) if baseline_ref else commit) - baseline_commit = commit_hash(baseline_ref) if baseline_ref else None + baseline_commit = None def has_expected_change(commit: GitHash) -> bool: return get_allowed_perf_changes(commit).get(name) is not None @@ -450,7 +450,8 @@ def baseline_metric(commit: GitHash, else: return None - for depth, current_commit in list(enumerate(commit_hashes))[1:]: + for depth, current_commit in list(enumerate(commit_hashes)): + if current_commit == commit: continue # Check for a metric on this commit. current_metric = get_commit_metric(namespace, current_commit, test_env, name, metric, way) if current_metric is not None: |