Skip to content

Commit 9eb385d

Browse files
committed
Add benchmark documentation and CI verification
Created comprehensive benchmark documentation page organized by component (ledger). Added bash scripts for building and running benchmarks, which are verified in CI to ensure commands exist in Makefile. Documentation includes: - Overview of criterion-based benchmarking - Build and run instructions using bash scripts - Ledger database benchmark details (account generation and merkle root computation) CI verification added to test-docs-scripts workflow: - Verifies benchmark scripts are executable - Confirms make targets exist in Makefile - Does not run benchmarks to avoid long CI times
1 parent e05625c commit 9eb385d

File tree

7 files changed

+303
-2
lines changed

7 files changed

+303
-2
lines changed

.github/workflows/test-docs-scripts.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,29 @@ jobs:
221221
# We'll just check if it was installed via Homebrew
222222
docker --version || echo "Docker installed but not running (expected on macOS CI)"
223223
224+
test-benchmark-commands:
225+
name: Verify Benchmark Commands
226+
runs-on: ubuntu-latest
227+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-doc-scripts')
228+
229+
steps:
230+
- name: Checkout repository
231+
uses: actions/checkout@v5
232+
233+
- name: Verify benchmark scripts and commands
234+
run: |
235+
# Check if scripts exist and are executable
236+
test -x ./website/docs/developers/scripts/benchmarks/build-benchmarks.sh
237+
test -x ./website/docs/developers/scripts/benchmarks/run-all-benchmarks.sh
238+
test -x ./website/docs/developers/scripts/benchmarks/run-database-benchmark.sh
239+
240+
# Verify the make targets referenced in scripts exist in Makefile
241+
grep -q "^build-benches:" Makefile
242+
grep -q "^bench:" Makefile
243+
grep -q "^bench-database:" Makefile
244+
245+
echo "SUCCESS: All benchmark commands verified"
246+
224247
test-update-ocaml-node-script:
225248
name: Test Update OCaml Node Script
226249
runs-on: ${{ matrix.os }}

Cargo.lock

Lines changed: 207 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)