Skip to content

Commit

Permalink
benchmarks: add ci rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Wünsche committed Jan 23, 2024
1 parent 1b6d494 commit 7b488e5
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,49 @@ jobs:
make fio
export BETREE_CONFIG=$(realpath ./.ci/haura.json)
./fio --direct=1 --rw=write --bs=4M --ioengine=external:src/fio-engine-haura.o --numjobs=1 --name=iops-test-job --size=128M
haura-benchmarks:
name: benchmarks for the haura storage engine
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: dependencies
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
run: |
rm --recursive --force "${HOME}/.cargo" "${HOME}/.rustup"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "${HOME}/.cargo/env"
echo "RUSTC_VERSION=$(rustc --version | grep --only-matching '[0-9]\+\.[0-9]\+\.[0-9]\+' | head --lines=1)" >> $GITHUB_ENV
- name: Cache fio
id: cache
uses: actions/cache@v3
# Environment variables do not seem to work, use ~ instead.
with:
path: |
~/.cargo
key: ubuntu-22.04-rustc-${{ env.RUSTC_VERSION }}-haura-benchmarks
- name: Build haura-benchmarks
run: |
cd betree/haura-benchmarks
cargo build --release
- name: Prepare scripts and configuration
run: |
cd betree/haura-benchmarks
echo "ci" >> run.sh
- name: Run benchmark smoke test
run: |
cd betree/haura-benchmarks
cp example_config/.ci-config.json perf-config.json
./run.sh smoke-test
rm perf-config.json
- name: Run plots
run: |
sudo apt update || true
sudo apt --yes --no-install-recommends install python3
cd betree/haura-benchmarks/haura-plots
poetry install
poetry run plots ../results/*
rm -rf results
38 changes: 38 additions & 0 deletions betree/haura-benchmarks/example_config/.ci-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"storage": {
"tiers": [
{
"top_level_vdevs": [
{
"mem": 2147483648
}
],
"preferred_access_type": "Unknown"
}
],
"queue_depth_factor": 20,
"thread_pool_size": null,
"thread_pool_pinned": false
},
"alloc_strategy": [
[
0
],
[
1
],
[
2
],
[
3
]
],
"default_storage_class": 0,
"compression": "None",
"cache_size": 4294967296,
"access_mode": "AlwaysCreateNew",
"sync_interval_ms": 1000,
"migration_policy": null,
"metrics": null
}
4 changes: 4 additions & 0 deletions betree/haura-benchmarks/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ function switchover() {
run "$VDEV_TYPE" switchover_large switchover 4 "$((8 * 1024 * 1024 * 1024))"
}

function ci() {
run "$VDEV_TYPE" switchover_small switchover 8 "$((128 * 1024 * 1024))"
}

cargo build --release

if [ -z "$BETREE_CONFIG" ]
Expand Down

0 comments on commit 7b488e5

Please sign in to comment.