Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 12 additions & 10 deletions pisa/scripts/benchmark_pipeline_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down