Benchmark #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Benchmark | |
on: | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
benchmark: | |
permissions: | |
contents: read | |
packages: read | |
strategy: | |
matrix: | |
hash: [mmh3_32, mmh3_128, xxh_32, xxh_64, xxh3_64, xxh3_128, md5, sha1] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install . | |
pip install ".[benchmark]" | |
- name: Benchmark hash functions | |
run: | | |
mkdir var | |
python benchmark/benchmark.py -o var/${{ matrix.hash }}.json \ | |
--test-hash ${{ matrix.hash }} --test-buffer-size-max 134217728 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-result-${{ matrix.hash }} | |
path: var/${{ matrix.hash }}.json | |
postprocess: | |
name: Postprocess benchmark results | |
runs-on: ubuntu-22.04 | |
needs: benchmark | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ./artifacts | |
- name: Zip benchmark results | |
run: | | |
mkdir var | |
mkdir var/benchmark_all_results | |
cp artifacts/*/*.json var/benchmark_all_results | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-results | |
path: var/benchmark_all_results |