Skip to content

Commit

Permalink
Merge pull request #1959 from dusk-network/mocello/1953_ast_bench
Browse files Browse the repository at this point in the history
rusk: Fix AST benchmarks
  • Loading branch information
moCello authored Jul 11, 2024
2 parents 88b35bb + e903929 commit 503eb0e
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 149 deletions.
50 changes: 41 additions & 9 deletions rusk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INITFILE?=../rusk-recovery/config/localnet.toml
help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'

test: ## Run Rusk tests
test: build-bench ## Run Rusk tests
@cargo test \
--release \
--features testwallet \
Expand All @@ -12,23 +12,55 @@ test: ## Run Rusk tests
clippy: ## Run clippy
@cargo clippy --all-features --release -- -D warnings
@cargo clippy --no-default-features --release -- -D warnings
@cargo clippy --no-default-features --features ephemeral --release -- -D warnings
@cargo clippy --no-default-features --features recovery-keys --release -- -D warnings
@cargo clippy --no-default-features --features recovery-state --release -- -D warnings
@cargo clippy --no-default-features --features prover --release -- -D warnings
@cargo clippy --no-default-features --features node --release -- -D warnings
@cargo clippy \
--no-default-features \
--features ephemeral \
--release \
-- -D warnings
@cargo clippy \
--no-default-features \
--features recovery-keys \
--release \
-- -D warnings
@cargo clippy \
--no-default-features \
--features recovery-state \
--release \
-- -D warnings
@cargo clippy \
--no-default-features \
--features prover \
--release \
-- -D warnings
@cargo clippy \
--no-default-features \
--features node \
--release \
-- -D warnings
@cargo check --benches --features testwallet

build: ## Build rusk binary
@cargo build --release

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

run:
@cargo r --release --bin rusk

recovery-keys: ## Build circuit keys
@cargo r --no-default-features --features recovery-keys --release -- recovery-keys
@cargo r \
--no-default-features \
--features recovery-keys \
--release \
-- recovery-keys

recovery-state: ## Build network state
@cargo r --no-default-features --features recovery-state --release -- recovery-state --init $(INITFILE)
@cargo r \
--no-default-features \
--features recovery-state \
--release \
-- recovery-state \
--init $(INITFILE)

.PHONY: test help clippy build recovery-keys recovery-state rusk
.PHONY: test help clippy build build-bench recovery-keys recovery-state rusk
100 changes: 0 additions & 100 deletions rusk/benches/block

This file was deleted.

4 changes: 3 additions & 1 deletion rusk/benches/block_ingestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ use tempfile::tempdir;
use common::state::new_state;

fn load_txs() -> Vec<Transaction> {
const TXS_BYTES: &[u8] = include_bytes!("block");
// The file "txs" can be generated using `generate_phoenix_txs()` in
// "tests/rusk-state.rs".
const TXS_BYTES: &[u8] = include_bytes!("txs");

let mut txs = Vec::new();

Expand Down
Loading

0 comments on commit 503eb0e

Please sign in to comment.