Skip to content
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
57 changes: 57 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Wildcat Benchmark

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
benchmark:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Download deps
run: go mod tidy

- name: Build bench tool
run: go build -o bench main.go

- name: Run fast bench
run: |
./bench \
-num=1000 \
-threads=2 \
-key_size=16 \
-value_size=100 \
-benchmarks="fillseq,readseq,readrandom" \
-cleanup=true \
-stats=false

- name: Run concurrent bench
run: |
./bench \
-num=500 \
-threads=4 \
-benchmarks="concurrent_writers,high_contention_writes" \
-cleanup=true \
-stats=false
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*.su
*.idb
*.pdb
*.mod*
*.cmd
.tmp_versions/
modules.order
Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module bench

go 1.24

require github.com/wildcatdb/wildcat/v2 v2.2.3

require (
go.mongodb.org/mongo-driver v1.17.3 // indirect
golang.org/x/sys v0.33.0 // indirect
)