From fe29309473cb475a6be58e0679f1f227cff9d2eb Mon Sep 17 00:00:00 2001 From: T Ehrhardt Date: Sat, 6 Jun 2026 00:12:49 +0200 Subject: [PATCH 1/3] Refactor write_benchmark_json to output only results (actually comply with github-action-benchmark format) --- .../scripts/benchmark_pipeline_performance.py | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pisa/scripts/benchmark_pipeline_performance.py b/pisa/scripts/benchmark_pipeline_performance.py index c1bdeab3f..9165b59b9 100755 --- a/pisa/scripts/benchmark_pipeline_performance.py +++ b/pisa/scripts/benchmark_pipeline_performance.py @@ -141,20 +141,21 @@ def write_benchmark_json(results, output_path, commit_sha=None, commit_msg=None) ------- Path Path to written JSON file + + Notes + ----- + The github-action-benchmark tool expects the JSON file to contain + only the array of results, not a wrapper object. Timestamp and commit + information are not included in the output file but can be added back + if needed for other purposes. """ output_path = Path(output_path) output_path.parent.mkdir(parents=True, exist_ok=True) - data = { - "timestamp": datetime.datetime.now(datetime.UTC).isoformat() + "Z", - "results": results, - } - - if commit_sha: - data["commit_sha"] = commit_sha - if commit_msg: - data["commit_msg"] = commit_msg + timestamp = datetime.datetime.now(datetime.UTC).isoformat() + "Z" + # Write only the results array, as expected by github-action-benchmark + data = results to_file(data, output_path) return output_path @@ -227,7 +228,8 @@ def main(): f"results_target_{TARGET}_nthreads_{PISA_NUM_THREADS}.json" ) - # Enrich with commit information + # Enrich with commit information (currently not written to file as + # github-action-benchmark expects only the results array) commit_sha = os.environ.get("GITHUB_SHA") commit_msg = os.environ.get("GITHUB_COMMIT_MSG") From a13bc677d2e67acfab36588a78d81180b71f42b7 Mon Sep 17 00:00:00 2001 From: T Ehrhardt Date: Sat, 6 Jun 2026 14:58:18 +0200 Subject: [PATCH 2/3] instruct documentation workflow to keep_files and set destination_dir to docs [no ci] --- .github/workflows/documentation.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index f04dfa61f..515363e10 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -32,3 +32,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html + # Destination directory in gh-pages not root but docs/ + destination_dir: docs + # Don't delete other existing files + keep_files: true From d3c2bb72e69b6c0226b24e6d5349f03f41a565c9 Mon Sep 17 00:00:00 2001 From: T Ehrhardt Date: Tue, 9 Jun 2026 00:42:02 +0200 Subject: [PATCH 3/3] add entry point for benchmarking script --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f6a07a9cb..6defe6565 100755 --- a/setup.py +++ b/setup.py @@ -327,6 +327,7 @@ def do_setup(): # Scripts in scripts dir 'pisa-add_flux_to_events_file = pisa.scripts.add_flux_to_events_file:main', + 'pisa-benchmark_pipeline_performance = pisa.scripts.benchmark_pipeline_performance:main', 'pisa-compare = pisa.scripts.compare:main', 'pisa-convert_config_format = pisa.scripts.convert_config_format:main', 'pisa-create_barr_sys_tables_mceq = pisa.scripts.create_barr_sys_tables_mceq:main',