Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: track compressed size & compare to parquet(zstd)? & canonical #882

Merged
merged 2 commits into from
Sep 20, 2024
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
25 changes: 22 additions & 3 deletions .github/workflows/bench-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,36 @@ jobs:

- name: Run benchmark
shell: bash
run: cargo bench --bench ${{ matrix.benchmark.id }} -- --output-format bencher | tee ${{ matrix.benchmark.id }}.txt
run: |
cargo install cargo-criterion

cargo criterion --bench ${{ matrix.benchmark.id }} --message-format=json 2>&1 | tee out.json

cat out.json

sudo apt-get update && sudo apt-get install -y jq

jq --raw-input --compact-output '
fromjson?
| [ (if .mean != null then {name: .id, value: .mean.estimate, unit: .unit, range: ((.mean.upper_bound - .mean.lower_bound) / 2) } else {} end),
(if .throughput != null then {name: (.id + " throughput"), value: .throughput[].per_iteration, unit: .throughput[].unit, range: 0} else {} end),
{name, value, unit, range} ]
| .[]
| select(.value != null)
' \
out.json \
| jq --slurp --compact-output '.' >${{ matrix.benchmark.id }}.json

cat ${{ matrix.benchmark.id }}.json
Comment on lines +55 to +72
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit excessive. I wonder if this is simpler if we write our own github action

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I think my preferred solution is either a CSV or a JSON Line file that we just append to.

- name: Store benchmark result
if: '!cancelled()'
uses: benchmark-action/github-action-benchmark@v1
with:
name: ${{ matrix.benchmark.name }}
tool: 'cargo'
tool: 'customSmallerIsBetter'
gh-pages-branch: gh-pages-bench
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file-path: ${{ matrix.benchmark.id }}.txt
output-file-path: ${{ matrix.benchmark.id }}.json
summary-always: true
comment-always: true
auto-push: false
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,36 @@ jobs:

- name: Run benchmark
shell: bash
run: cargo bench --bench ${{ matrix.version.id }} -- --output-format bencher | tee ${{ matrix.version.id }}.txt
run: |
cargo install cargo-criterion

cargo criterion --bench ${{ matrix.benchmark.id }} --message-format=json 2>&1 | tee out.json

cat out.json

sudo apt-get update && sudo apt-get install -y jq

jq --raw-input --compact-output '
fromjson?
| [ (if .mean != null then {name: .id, value: .mean.estimate, unit: .unit, range: ((.mean.upper_bound - .mean.lower_bound) / 2) } else {} end),
(if .throughput != null then {name: (.id + " throughput"), value: .throughput[].per_iteration, unit: .throughput[].unit, range: 0} else {} end),
{name, value, unit, range} ]
| .[]
| select(.value != null)
' \
out.json \
| jq --slurp --compact-output '.' >${{ matrix.benchmark.id }}.json

cat ${{ matrix.benchmark.id }}.json
- name: Store benchmark result
if: '!cancelled()'
uses: benchmark-action/github-action-benchmark@v1
with:
name: ${{ matrix.version.name }}
tool: 'cargo'
name: ${{ matrix.benchmark.name }}
tool: 'customSmallerIsBetter'
gh-pages-branch: gh-pages-bench
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file-path: ${{ matrix.version.id }}.txt
output-file-path: ${{ matrix.benchmark.id }}.json
summary-always: true
auto-push: true
fail-on-alert: false
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bench-vortex/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
data
data
1 change: 1 addition & 0 deletions bench-vortex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ rand = { workspace = true }
rayon = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
simplelog = { workspace = true }
tar = { workspace = true }
tokio = { workspace = true, features = ["full"] }
Expand Down
Loading
Loading