Skip to content

Commit 68580f7

Browse files
committed
perf(ci): shard benchmarks into 4 parallel jobs for faster CI
1 parent 30ba69e commit 68580f7

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,24 @@ permissions:
2929

3030
jobs:
3131
benchmark:
32-
name: "Benchmark"
32+
name: "Benchmark (${{ matrix.shard }})"
3333
runs-on: ubuntu-latest
34-
timeout-minutes: 15
34+
timeout-minutes: 5
3535
permissions:
3636
contents: read
3737
id-token: write
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
include:
42+
- shard: "load-reload-get"
43+
filter: "TestBenchLoad or TestBenchReload or TestBenchGet"
44+
- shard: "all-find"
45+
filter: "TestBenchAll or TestBenchFind"
46+
- shard: "write-compact"
47+
filter: "TestBenchPut or TestBenchBatchWrite or TestBenchCompact"
48+
- shard: "keys-items-count-has-delete"
49+
filter: "TestBenchKeys or TestBenchItems or TestBenchCount or TestBenchHas or TestBenchDelete"
3850

3951
steps:
4052
- name: Checkout code
@@ -50,4 +62,4 @@ jobs:
5062
uses: CodSpeedHQ/action@346a2d8a8d9d38909abd0bc3d23f773110f076ad # v4.4.1
5163
with:
5264
mode: simulation
53-
run: uv run pytest -m benchmark --codspeed
65+
run: uv run pytest -m benchmark -k "${{ matrix.filter }}" --codspeed

0 commit comments

Comments
 (0)