Skip to content

Commit

Permalink
Merge pull request #2190 from dusk-network/benchmark-workflow
Browse files Browse the repository at this point in the history
Benchmark workflow
  • Loading branch information
HDauven authored Aug 24, 2024
2 parents 46594e0 + 2035aa5 commit 844ad3b
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 16 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Benchmark CI

on:
push:
branches:
- master

jobs:
# Job to run change detection
changes:
runs-on: core
permissions:
pull-requests: read
outputs:
run-ci: ${{ steps.filter.outputs.run-ci }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
run-ci:
- 'rusk/**/*
- 'node/**/*
predicate-quantifier: "any"

benchmark:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: Run Benchmarks
runs-on: core
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: make bench
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: rusk-benchmark-results
path: ./target/criterion
retention-days: 14
15 changes: 0 additions & 15 deletions .github/workflows/rusk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,3 @@ jobs:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: cargo fmt --all -- --check
benchmark:
needs: changes
if: needs.changes.outputs.run-ci == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Run Benchmarks
runs-on: core
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: make bench
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: rusk-benchmark-results
path: ./target/criterion
retention-days: 14
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ doc: ## Run doc gen
$(MAKE) -C ./rusk-recovery $@
$(MAKE) -C ./wallet-core/ $@

bench: keys wasm ## Bench Rusk
bench: keys wasm ## Bench Rusk & node
$(MAKE) -C ./node bench
$(MAKE) -C ./rusk bench

run: keys state web-wallet ## Run the server
Expand Down
6 changes: 6 additions & 0 deletions node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ test: ## Run Node tests
binary: ## Build a binary
@cargo b --release --bin rusk-node

build-bench: ## Build the benchmarks
@cargo bench --no-run

bench: ## Run the benchmarks
@cargo bench

debug_with_telemetry: # Build a binary with telemetry enabled. Currently, telemetry is only based on tokio_console
cargo --config 'build.rustflags = ["--cfg", "tokio_unstable"]' build --features with_telemetry --bin rusk-node

Expand Down

0 comments on commit 844ad3b

Please sign in to comment.