feat: add benchmark for column store and optimize performance #425
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" ] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| ut-with-tsan: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: UT-tsan | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Config, Build, and UT with tsan | |
| run: | | |
| cmake --preset debug_tsan | |
| cmake --build build/debug_tsan -j `nproc` | |
| TSAN_OPTIONS="suppressions=$(pwd)/tests/tsan.supp" ctest --test-dir build/debug_tsan --output-on-failure -j 2 | |
| ut-with-gcovr: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: UT-coverage | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Config | |
| run: cmake --preset debug_cov | |
| - name: Cppcheck | |
| run: cppcheck --project=build/debug_cov/compile_commands.json -i tests --error-exitcode=1 --check-level=exhaustive | |
| - name: Clang-format | |
| run: cmake --build build/debug_cov --target=check-format | |
| - name: Build | |
| run: cmake --build build/debug_cov -j `nproc` | |
| - name: UT with coverage | |
| run: TSAN_OPTIONS="suppressions=$(pwd)/tests/tsan.supp" ctest --test-dir build/debug_cov --output-on-failure -j 2 | |
| - name: Generate coverage file | |
| run: gcovr -v -r . --xml-pretty --xml=coverage.xml --exclude 'build/*' --exclude 'tests/*' --exclude 'tools/*' --verbose | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| fail_ci_if_error: true | |
| files: coverage.xml | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| coro-mode: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "[CORO] UT-coverage" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Config project | |
| run: | | |
| cmake --preset debug_coro | |
| - name: Cppcheck | |
| run: cppcheck --project=build/debug_coro/compile_commands.json -i tests --error-exitcode=1 --check-level=exhaustive | |
| - name: Clang-format | |
| run: cmake --build build/debug_coro --target=check-format | |
| - name: Build | |
| run: cmake --build build/debug_coro -j `nproc` | |
| - name: Unit test with coroutine enabled | |
| run: ctest --test-dir build/debug_coro --output-on-failure -j 2 | |
| - name: Generate coverage file | |
| run: gcovr -v -r . --xml-pretty --xml=coverage_coro.xml --exclude 'build/*' --exclude 'tests/*' --exclude 'tools/*' --verbose | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| fail_ci_if_error: true | |
| files: coverage_coro.xml | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| build-release-coro-mode: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "[CORO] Build Release" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Config, build, install | |
| run: | | |
| cmake --preset release_coro | |
| cmake --build build/release_coro -j `nproc` | |
| cmake --install build/release_coro | |
| - name: Package artifact | |
| run: | | |
| tar -czf leanstore-coro-mode.tar.gz dist/release_coro | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: leanstore-release-coro | |
| path: leanstore-coro-mode.tar.gz | |
| ycsb_b_coro_basickv: | |
| runs-on: ubuntu-latest | |
| needs: [build-release-coro-mode] | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "[CORO] Bench YCSB B on BasicKV" | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: leanstore-release-coro | |
| - name: Unpack artifact | |
| run: | | |
| tar -xzf leanstore-coro-mode.tar.gz | |
| LD_LIBRARY_PATH=./dist/release_coro/lib ldd ./dist/release_coro/bin/ycsb | |
| - name: YCSB data load | |
| run: | | |
| LD_LIBRARY_PATH=./dist/release_coro/lib ./dist/release_coro/bin/ycsb --dir=/tmp/leanstore/coro \ | |
| --key_size=16 --val_size=200 --rows=10000 --dram=1 \ | |
| --backend=basickv --workload=b \ | |
| --workers=2 --clients=6 \ | |
| --action=load | |
| - name: YCSB bench | |
| run: | | |
| LD_LIBRARY_PATH=./dist/release_coro/lib ./dist/release_coro/bin/ycsb --dir=/tmp/leanstore/coro \ | |
| --key_size=16 --val_size=200 --rows=10000 --dram=1 \ | |
| --backend=basickv --workload=b \ | |
| --workers=2 --clients=6 --duration=30 \ | |
| --action=run > ycsb_b_coro_basickv.out | |
| sed -i '1i**[CORO] Bench YCSB B on BasicKV**\n```txt' ycsb_b_coro_basickv.out | |
| echo '```' >> ycsb_b_coro_basickv.out | |
| cat ycsb_b_coro_basickv.out | |
| - name: Upload bench result | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ycsb_b_coro_basickv.out | |
| path: ycsb_b_coro_basickv.out | |
| ycsb_b_coro_transactionkv: | |
| runs-on: ubuntu-latest | |
| needs: [build-release-coro-mode] | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "[CORO] Bench YCSB B on TransactionKV" | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: leanstore-release-coro | |
| - name: Unpack artifact | |
| run: | | |
| tar -xzf leanstore-coro-mode.tar.gz | |
| LD_LIBRARY_PATH=./dist/release_coro/lib ldd ./dist/release_coro/bin/ycsb | |
| - name: YCSB data load | |
| run: | | |
| LD_LIBRARY_PATH=./dist/release_coro/lib ./dist/release_coro/bin/ycsb --dir=/tmp/leanstore/coro \ | |
| --key_size=16 --val_size=200 --rows=10000 --dram=1 \ | |
| --backend=transactionkv --workload=b \ | |
| --workers=2 --clients=6 \ | |
| --action=load | |
| - name: YCSB bench | |
| run: | | |
| LD_LIBRARY_PATH=./dist/release_coro/lib ./dist/release_coro/bin/ycsb --dir=/tmp/leanstore/coro \ | |
| --key_size=16 --val_size=200 --rows=10000 --dram=1 \ | |
| --backend=transactionkv --workload=b \ | |
| --workers=2 --clients=6 --duration=30 \ | |
| --action=run > ycsb_b_coro_transactionkv.out | |
| sed -i '1i**[CORO] Bench YCSB B on TransactionKV**\n```txt' ycsb_b_coro_transactionkv.out | |
| echo '```' >> ycsb_b_coro_transactionkv.out | |
| cat ycsb_b_coro_transactionkv.out | |
| - name: Upload bench result | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ycsb_b_coro_transactionkv.out | |
| path: ycsb_b_coro_transactionkv.out | |
| display-bench-results: | |
| runs-on: ubuntu-latest | |
| needs: [ycsb_b_coro_basickv, ycsb_b_coro_transactionkv] | |
| name: "Display Bench Results" | |
| steps: | |
| - name: Download ycsb_b_coro_basickv.out | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ycsb_b_coro_basickv.out | |
| - name: Download ycsb_b_coro_transactionkv.out | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ycsb_b_coro_transactionkv.out | |
| - name: Combine results | |
| run: | | |
| touch combined.out | |
| cat ycsb_b_coro_basickv.out >> combined.out | |
| cat ycsb_b_coro_transactionkv.out >> combined.out | |
| - name: Display results in comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: "YCSB Bench Results" | |
| path: combined.out | |
| example_coro_release: | |
| runs-on: ubuntu-latest | |
| needs: [build-release-coro-mode] | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "[CORO] Example C" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: leanstore-release-coro | |
| - name: Unpack artifact | |
| run: | | |
| tar -xzf leanstore-coro-mode.tar.gz | |
| - name: Build and run C example | |
| run: | | |
| cd examples/c | |
| cmake -B build -S . \ | |
| -DCMAKE_PREFIX_PATH="../../dist/release_coro;/opt/vcpkg/installed/x64-linux" | |
| cmake --build build -j `nproc` | |
| ./build/kv_basic_example | |
| clang-tidy: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "Clang-Tidy" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Config project | |
| run: | | |
| cmake --preset debug_tsan | |
| - name: Clang-Tidy on changed files | |
| run: | | |
| bash ".github/scripts/run-clang-tidy-pr.sh" \ | |
| "${{ github.event.pull_request.number }}" \ | |
| "${{ github.repository }}" \ | |
| "${{ secrets.GITHUB_TOKEN }}" \ | |
| "build/debug_tsan" | |
| clang-tidy-coro: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: zzjason/leanstore-dev:latest | |
| name: "[CORO] Clang-Tidy" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Config project | |
| run: | | |
| cmake --preset debug_coro | |
| - name: Clang-Tidy on changed files | |
| run: | | |
| bash ".github/scripts/run-clang-tidy-pr.sh" \ | |
| "${{ github.event.pull_request.number }}" \ | |
| "${{ github.repository }}" \ | |
| "${{ secrets.GITHUB_TOKEN }}" \ | |
| "build/debug_coro" |