|
56 | 56 | run: cargo codspeed run
|
57 | 57 | token: ${{ secrets.CODSPEED_TOKEN }}
|
58 | 58 |
|
59 |
| - bench-criterion: |
60 |
| - needs: label_trigger |
61 |
| - strategy: |
62 |
| - matrix: |
63 |
| - benchmark: |
64 |
| - - id: compress |
65 |
| - name: Vortex Compression |
66 |
| - runs-on: [ self-hosted, gcp ] |
67 |
| - if: ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'benchmark' && github.event_name == 'pull_request' }} |
68 |
| - steps: |
69 |
| - - uses: actions/checkout@v4 |
70 |
| - - uses: ./.github/actions/cleanup |
71 |
| - - uses: ./.github/actions/setup-rust |
72 |
| - |
73 |
| - # The compression benchmarks rely on DuckDB being installed to convert CSV to Parquet |
74 |
| - - name: Install DuckDB |
75 |
| - |
76 |
| - if: runner.environment != 'self-hosted' |
77 |
| - with: |
78 |
| - version: v1.0.0 |
79 |
| - |
80 |
| - - name: Set tempdir |
81 |
| - if: runner.environment == 'self-hosted' |
82 |
| - run: | |
83 |
| - echo "TMPDIR=/work" >> $GITHUB_ENV |
84 |
| -
|
85 |
| - - name: Run benchmark |
86 |
| - shell: bash |
87 |
| - env: |
88 |
| - BENCH_VORTEX_RATIOS: '.*' |
89 |
| - RUSTFLAGS: '-C target-cpu=native' |
90 |
| - run: | |
91 |
| - cargo install cargo-criterion |
92 |
| - sudo apt-get update && sudo apt-get install -y jq |
93 |
| -
|
94 |
| - cargo criterion \ |
95 |
| - --bench ${{ matrix.benchmark.id }} \ |
96 |
| - --features mimalloc \ |
97 |
| - --message-format=json \ |
98 |
| - > ${{ matrix.benchmark.id }}-raw.json |
99 |
| -
|
100 |
| - cat ${{ matrix.benchmark.id }}-raw.json \ |
101 |
| - | bash scripts/coerce-criterion-json.sh \ |
102 |
| - > ${{ matrix.benchmark.id }}.json |
103 |
| -
|
104 |
| - - name: Setup AWS CLI |
105 |
| - uses: aws-actions/configure-aws-credentials@v4 |
106 |
| - with: |
107 |
| - role-to-assume: arn:aws:iam::375504701696:role/GitHubBenchmarkRole |
108 |
| - aws-region: us-east-1 |
109 |
| - - name: Install uv |
110 |
| - uses: astral-sh/setup-uv@v5 |
111 |
| - - name: Compare results |
112 |
| - shell: bash |
113 |
| - run: | |
114 |
| - set -Eeu -o pipefail -x |
115 |
| -
|
116 |
| - base_commit_sha=${{ github.event.pull_request.base.sha }} |
117 |
| -
|
118 |
| - aws s3 cp s3://vortex-benchmark-results-database/data.json - \ |
119 |
| - | grep $base_commit_sha \ |
120 |
| - > base.json |
121 |
| -
|
122 |
| - echo '# Benchmarks: ${{ matrix.benchmark.id }}' > comment.md |
123 |
| - echo '<details>' >> comment.md |
124 |
| - echo '<summary>Table of Results</summary>' >> comment.md |
125 |
| - echo '' >> comment.md |
126 |
| - uv run scripts/compare-benchmark-jsons.py base.json ${{ matrix.benchmark.id }}.json \ |
127 |
| - >> comment.md |
128 |
| - echo '</details>' >> comment.md |
129 |
| - - name: Comment PR |
130 |
| - uses: thollander/actions-comment-pull-request@v3 |
131 |
| - with: |
132 |
| - file-path: comment.md |
133 |
| - comment-tag: bench-pr-comment-${{ matrix.benchmark.id }} |
134 | 59 | bench:
|
135 | 60 | needs: label_trigger
|
136 | 61 | runs-on: [ self-hosted, gcp ]
|
|
139 | 64 | benchmark:
|
140 | 65 | - id: random_access
|
141 | 66 | name: Random Access
|
| 67 | + - id: compress |
| 68 | + name: Compression |
142 | 69 | if: ${{ contains(github.event.head_commit.message, '[benchmark]') || github.event.label.name == 'benchmark' && github.event_name == 'pull_request' }}
|
143 | 70 | steps:
|
144 | 71 | - uses: actions/checkout@v4
|
|
0 commit comments