feat: add stress tests and fix critical bugs #3
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Build | |
| run: nix build | |
| - name: Run tests | |
| run: nix develop -c cargo test --all | |
| - name: Check formatting | |
| run: nix develop -c cargo fmt --check | |
| - name: Clippy | |
| run: nix develop -c cargo clippy --all -- -D warnings | |
| benchmarks: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Build | |
| run: nix build | |
| - name: Compile benchmarks | |
| run: | | |
| gcc -O3 -pthread benches/packet_churn.c -o /tmp/packet_churn | |
| gcc -O3 -pthread benches/kv_store.c -o /tmp/kv_store | |
| gcc -O3 -pthread benches/producer_consumer.c -o /tmp/producer_consumer | |
| gcc -O3 -pthread benches/multithread_churn.c -o /tmp/multithread_churn | |
| gcc -O3 -pthread benches/fragmentation.c -o /tmp/fragmentation | |
| - name: Packet Churn | |
| run: | | |
| echo "GLIBC=$(/tmp/packet_churn | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| echo "AETHALLOC=$(LD_PRELOAD=$(realpath result/lib/*.so) /tmp/packet_churn | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| - name: KV Store | |
| run: | | |
| echo "GLIBC_KV=$(/tmp/kv_store | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| echo "AETHALLOC_KV=$(LD_PRELOAD=$(realpath result/lib/*.so) /tmp/kv_store | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| - name: Producer-Consumer | |
| run: | | |
| echo "GLIBC_PC=$(/tmp/producer_consumer | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| echo "AETHALLOC_PC=$(LD_PRELOAD=$(realpath result/lib/*.so) /tmp/producer_consumer | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| - name: Multithread Churn | |
| run: | | |
| echo "GLIBC_MT=$(/tmp/multithread_churn | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| echo "AETHALLOC_MT=$(LD_PRELOAD=$(realpath result/lib/*.so) /tmp/multithread_churn | jq -r '.throughput_ops_per_sec')" >> $GITHUB_ENV | |
| - name: Fragmentation | |
| run: | | |
| echo "GLIBC_RSS=$(/tmp/fragmentation | jq -r '.summary.final_rss_kb')" >> $GITHUB_ENV | |
| echo "AETHALLOC_RSS=$(LD_PRELOAD=$(realpath result/lib/*.so) /tmp/fragmentation | jq -r '.summary.final_rss_kb')" >> $GITHUB_ENV | |
| stress-tests: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Build | |
| run: nix build | |
| - name: Compile stress tests | |
| run: | | |
| gcc -O3 benches/tail_latency.c -o /tmp/tail_latency | |
| gcc -O3 benches/massive_alloc.c -o /tmp/massive_alloc | |
| gcc -O3 benches/corruption_test.c -o /tmp/corruption_test | |
| - name: Tail Latency | |
| run: | | |
| echo "=== GLIBC ===" && /tmp/tail_latency 8 50000 | |
| echo "=== AETHALLOC ===" && LD_PRELOAD=$(realpath result/lib/*.so) /tmp/tail_latency 8 50000 | |
| - name: Massive Allocations | |
| run: | | |
| echo "=== GLIBC ===" && /tmp/massive_alloc | |
| echo "=== AETHALLOC ===" && LD_PRELOAD=$(realpath result/lib/*.so) /tmp/massive_alloc | |
| - name: Corruption Test | |
| run: LD_PRELOAD=$(realpath result/lib/*.so) /tmp/corruption_test | |
| macro-benchmark: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build aethalloc | |
| run: nix build | |
| - name: Clone ripgrep | |
| run: cd /tmp && git clone --depth 1 https://github.com/BurntSushi/ripgrep.git | |
| - name: Build ripgrep (glibc) | |
| run: | | |
| echo "=== GLIBC ===" | |
| time cargo build --release --manifest-path /tmp/ripgrep/Cargo.toml 2>&1 | tail -5 | |
| - name: Clean and rebuild (aethalloc) | |
| run: | | |
| cargo clean --manifest-path /tmp/ripgrep/Cargo.toml | |
| echo "=== AETHALLOC ===" | |
| time bash -c 'LD_PRELOAD=$(realpath result/lib/*.so) cargo build --release --manifest-path /tmp/ripgrep/Cargo.toml 2>&1 | tail -5' |