Benchmark #4
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: Benchmark | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| scenario: | |
| description: "Scenario to run" | |
| required: true | |
| default: "quick" | |
| type: choice | |
| options: | |
| - quick | |
| - steady | |
| - burst | |
| - stress | |
| - all | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: tests/benchmark | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: | | |
| uv venv .venv | |
| source .venv/bin/activate | |
| uv pip install -r requirements.txt | |
| - name: Install Rust toolchain (stable + nightly + rust-src) | |
| run: | | |
| rustup install stable | |
| rustup install nightly | |
| rustup component add rust-src --toolchain nightly | |
| working-directory: . | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: honeybeepf-llm | |
| - name: Install bpf-linker | |
| run: cargo install bpf-linker | |
| working-directory: . | |
| - name: Build honeybeepf-llm agent | |
| run: cargo +nightly build --release -p honeybeepf-llm | |
| working-directory: honeybeepf-llm | |
| - name: setcap eBPF capabilities | |
| run: | | |
| sudo setcap cap_bpf,cap_sys_admin,cap_perfmon,cap_net_admin=eip honeybeepf-llm/target/release/honeybeepf-llm | |
| getcap honeybeepf-llm/target/release/honeybeepf-llm | |
| working-directory: . | |
| - name: Create otel-output directory | |
| run: | | |
| mkdir -p otel-output | |
| chmod 777 otel-output | |
| - name: Start services | |
| run: docker compose up -d --wait | |
| - name: Run benchmark | |
| run: | | |
| source .venv/bin/activate | |
| python run_benchmark.py \ | |
| --scenario ${{ inputs.scenario }} \ | |
| --output results.json \ | |
| --markdown summary.md \ | |
| --ebpf-binary ../../honeybeepf-llm/target/release/honeybeepf-llm | |
| - name: Post results to Job Summary | |
| run: cat summary.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-output | |
| path: | | |
| tests/benchmark/results.json | |
| tests/benchmark/summary.md | |
| tests/benchmark/otel-output/otel.jsonl | |
| retention-days: 14 | |
| - name: Teardown | |
| if: always() | |
| run: docker compose down |