Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
danking committed Dec 11, 2024
1 parent 34de678 commit ad552a5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ permissions:
deployments: write

jobs:
commit-metadata:
runs-on: ubuntu
steps:
- uses: actions/checkout@v4
- name: Upload Commit Metadata
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y jq
bash scripts/cat-s3.sh vortex-bench-dev commits.json <(bash scripts/commit-json.sh)
bench:
strategy:
matrix:
Expand Down
28 changes: 28 additions & 0 deletions scripts/coerce-criterion-json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

commit_id=$(git rev-parse HEAD)

jq --compact-output 'select(.reason == "benchmark-complete" or .reason == null)
| if (.throughput | length) == 0
then ([{
name: (.name // .id),
unit: .unit,
value: (.value // .mean.estimate),
commit_id: "'$commit_id'"
}])
else ([{
name: .id,
unit: .unit,
value: .mean.estimate,
commit_id: "'$commit_id'"
}, {
name: (.id + "throughput"),
unit: (.throughput[0].unit + "/" + .unit),
value: (.throughput[0].per_iteration / .mean.estimate),
time: .mean.estimate,
bytes: .throughput[0].per_iteration,
commit_id: "'$commit_id'"
}])
end
| .[]
'
2 changes: 1 addition & 1 deletion scripts/commit-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ commit_timestamp=$(git log -1 --format=%cd --date=iso-strict)
tree_id=$(git rev-parse --verify HEAD^{tree})
repo_url=$(git config --get remote.origin.url | sed 's/[email protected]:/https:\/\/github.com\//' | sed 's/.git$//') # Convert to HTTPS format

jq -c '.' > commit.json <<EOF
jq --compact-output '.' <<EOF
{
"author": {
"email": "$author_email",
Expand Down

0 comments on commit ad552a5

Please sign in to comment.