From 0c830b5b99d6ce5c212cbbfee502b37a521b0efa Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Fri, 4 Mar 2022 09:40:10 +0000 Subject: [PATCH 1/2] Overnight benchmarks remove ambiguity between file and commit names. --- .github/workflows/benchmark.yml | 7 ++++--- noxfile.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 086f6a0bb4..b1efe1e409 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -79,12 +79,13 @@ jobs: cd benchmarks/.asv/performance-shifts for commit_file in * do - pr_number=$(git log "$commit_file"^! --oneline | grep -o "#[0-9]*" | tail -1 | cut -c 2-) + commit="${file_path%.*}" + pr_number=$(git log "$commit"^! --oneline | grep -o "#[0-9]*" | tail -1 | cut -c 2-) assignee=$(gh pr view $pr_number --json author -q '.["author"]["login"]' --repo $GITHUB_REPOSITORY) - title="Performance Shift(s): \`$commit_file\`" + title="Performance Shift(s): \`$commit\`" body=" Benchmark comparison has identified performance shifts at commit \ - $commit_file (#$pr_number). Please review the report below and \ + $commit (#$pr_number). Please review the report below and \ take corrective/congratulatory action as appropriate \ :slightly_smiling_face: diff --git a/noxfile.py b/noxfile.py index e4d91c6bab..c65319c35f 100755 --- a/noxfile.py +++ b/noxfile.py @@ -432,7 +432,7 @@ def asv_compare(*commits): # Dir is used by .github/workflows/benchmarks.yml, # but not cached - intended to be discarded after run. shifts_dir.mkdir(exist_ok=True, parents=True) - shifts_path = shifts_dir / after + shifts_path = (shifts_dir / after).with_suffix(".txt") with shifts_path.open("w") as shifts_file: shifts_file.write(shifts) From 0ebd7e35804e217b3102c7ff88f66ccc83bca7d8 Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Fri, 4 Mar 2022 10:19:52 +0000 Subject: [PATCH 2/2] Overnight benchmarks typo fix. --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b1efe1e409..6b155fc8bc 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -79,7 +79,7 @@ jobs: cd benchmarks/.asv/performance-shifts for commit_file in * do - commit="${file_path%.*}" + commit="${commit_file%.*}" pr_number=$(git log "$commit"^! --oneline | grep -o "#[0-9]*" | tail -1 | cut -c 2-) assignee=$(gh pr view $pr_number --json author -q '.["author"]["login"]' --repo $GITHUB_REPOSITORY) title="Performance Shift(s): \`$commit\`"