Compare ToplingDB bench #6
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: Compare ToplingDB bench | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| rocksdb_image: | |
| description: GHCR image for official rocksdb standalone (empty = ghcr.io/<owner>/nebula-standalone-rocksdb:latest) | |
| required: false | |
| default: "" | |
| topling_image: | |
| description: GHCR image for topling standalone (empty = ghcr.io/<owner>/nebula-standalone-topling:latest) | |
| required: false | |
| default: "" | |
| scale_factor: | |
| description: LDBC scale factor | |
| required: false | |
| default: "0.1" | |
| stress_args: | |
| description: Args passed to run.py stress run --args= | |
| required: false | |
| default: "-d 3s" | |
| permissions: | |
| contents: read | |
| packages: read | |
| concurrency: | |
| group: compare-toplingdb-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| BENCH_ROOT: ${{ github.workspace }} | |
| jobs: | |
| bench: | |
| name: ${{ matrix.profile }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| profile: [rocksdb, conservative, enterprise] | |
| steps: | |
| - name: Checkout nebula-bench | |
| uses: actions/checkout@v5 | |
| - name: Cache Maven | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('scripts/vendor/**', 'scripts/ci/bootstrap-dsol-xml-maven.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.8" | |
| - name: Set up JDK 1.8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "8" | |
| - name: Set up Maven | |
| uses: stCarolas/setup-maven@v5.1 | |
| with: | |
| maven-version: 3.5.4 | |
| - name: Bootstrap LDBC datagen Maven deps | |
| run: bash scripts/ci/bootstrap-dsol-xml-maven.sh | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.20.3" | |
| - name: Cache Hadoop | |
| uses: actions/cache@v5 | |
| with: | |
| path: target/data/hadoop-3.2.1.tar.gz | |
| key: ${{ runner.os }}-hadoop-${{ hashFiles('scripts/generate-data.sh') }} | |
| - name: Install bench deps (importer + k6) | |
| env: | |
| CGO_ENABLED: "0" | |
| INSTALL_SYSTEM_DEPS: "1" | |
| run: bash scripts/ci/install-bench-deps.sh | |
| - name: Login to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull image and run profile bench | |
| env: | |
| ROCKSDB_IMAGE: ${{ inputs.rocksdb_image != '' && inputs.rocksdb_image || format('ghcr.io/{0}/nebula-standalone-rocksdb:latest', github.repository_owner) }} | |
| TOPLING_IMAGE: ${{ inputs.topling_image != '' && inputs.topling_image || format('ghcr.io/{0}/nebula-standalone-topling:latest', github.repository_owner) }} | |
| SCALE_FACTOR: ${{ inputs.scale_factor }} | |
| STRESS_ARGS: ${{ inputs.stress_args }} | |
| run: | | |
| set -euo pipefail | |
| echo "ROCKSDB_IMAGE=${ROCKSDB_IMAGE}" | |
| echo "TOPLING_IMAGE=${TOPLING_IMAGE}" | |
| # Guard: no nebula compile in this workflow | |
| if grep -RInE 'cmake|make build|docker build' scripts/ci/run-profile-bench.sh >/dev/null; then | |
| echo "unexpected compile hooks in run-profile-bench.sh" >&2 | |
| exit 1 | |
| fi | |
| bash scripts/ci/run-profile-bench.sh "${{ matrix.profile }}" | |
| - name: Upload profile output | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: bench-${{ matrix.profile }} | |
| path: output/${{ matrix.profile }}-* | |
| if-no-files-found: warn | |
| report: | |
| name: comparison-report | |
| needs: bench | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| concurrency: | |
| group: compare-toplingdb-pages | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout nebula-bench | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.8" | |
| - name: Install report deps | |
| run: python3 -m pip install --upgrade pip && python3 -m pip install -r requirements.txt | |
| - name: Download bench artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| path: output | |
| pattern: bench-* | |
| merge-multiple: true | |
| - name: Generate comparison report | |
| run: bash scripts/ci/generate-comparison-report.sh | |
| - name: Upload comparison report artifact | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: comparison-report | |
| path: output/comparison-report/ | |
| if-no-files-found: error | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: output/comparison-report | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Publish report URL | |
| if: success() | |
| env: | |
| PAGE_URL: ${{ steps.deployment.outputs.page_url }} | |
| run: | | |
| set -euo pipefail | |
| base="${PAGE_URL%/}/" | |
| { | |
| echo "## ToplingDB Benchmark Comparison" | |
| echo | |
| echo "**Report site:** ${base}" | |
| echo | |
| echo "| Report | URL |" | |
| echo "| --- | --- |" | |
| echo "| **Triple comparison (charts + table)** | ${base}comparison.html |" | |
| echo "| Index | ${base} |" | |
| for name in rocksdb conservative enterprise; do | |
| if [[ -f "output/comparison-report/${name}.html" ]]; then | |
| echo "| ${name} (single) | ${base}${name}.html |" | |
| fi | |
| done | |
| } >> "${GITHUB_STEP_SUMMARY}" |