mirror of
https://github.com/kristoferssolo/tls-pq-bench.git
synced 2026-03-22 00:36:21 +00:00
chore: add benchmark entry to justfile
This commit is contained in:
41
justfile
41
justfile
@@ -1,48 +1,70 @@
|
|||||||
export RUSTC_WRAPPER := "sccache"
|
export RUSTC_WRAPPER := "sccache"
|
||||||
|
export RUST_LOG := env_var_or_default("RUST_LOG", "warn")
|
||||||
|
|
||||||
set shell := ["bash", "-cu"]
|
set shell := ["bash", "-cu"]
|
||||||
|
|
||||||
# Default recipe
|
# Default recipe
|
||||||
default:
|
default:
|
||||||
@just --list
|
@just --list
|
||||||
|
|
||||||
|
alias b := build
|
||||||
alias c := check
|
alias c := check
|
||||||
|
alias d := docs
|
||||||
|
alias f := fmt
|
||||||
|
alias t := test
|
||||||
|
|
||||||
# Run all checks (fmt, clippy, docs, test)
|
# Run all checks (fmt, clippy, docs, test)
|
||||||
|
[group("dev")]
|
||||||
check: fmt clippy docs test
|
check: fmt clippy docs test
|
||||||
|
|
||||||
alias f := fmt
|
|
||||||
# Format code
|
# Format code
|
||||||
|
[group("dev")]
|
||||||
fmt:
|
fmt:
|
||||||
cargo fmt --all
|
cargo fmt --all
|
||||||
|
|
||||||
# Check formatting without modifying
|
# Check formatting without modifying
|
||||||
|
[group("dev")]
|
||||||
fmt-check:
|
fmt-check:
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
# Run clippy
|
# Run clippy
|
||||||
|
[group("dev")]
|
||||||
clippy:
|
clippy:
|
||||||
cargo clippy --all-targets --all-features -- -D warnings
|
cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
alias d := docs
|
|
||||||
# Build documentation
|
# Build documentation
|
||||||
|
[group("dev")]
|
||||||
docs:
|
docs:
|
||||||
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
||||||
|
|
||||||
alias t := test
|
|
||||||
# Run tests with nextest
|
# Run tests with nextest
|
||||||
|
[group("dev")]
|
||||||
test:
|
test:
|
||||||
cargo nextest run --all-features
|
cargo nextest run --all-features
|
||||||
cargo test --doc
|
cargo test --doc
|
||||||
|
|
||||||
alias b := build
|
|
||||||
# Build release binaries
|
# Build release binaries
|
||||||
|
[group("dev")]
|
||||||
build:
|
build:
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
||||||
|
# Clean build artifacts
|
||||||
|
[group("dev")]
|
||||||
|
clean:
|
||||||
|
cargo clean
|
||||||
|
|
||||||
|
# Install dev dependencies
|
||||||
|
[group("dev")]
|
||||||
|
setup:
|
||||||
|
cargo install cargo-nextest
|
||||||
|
|
||||||
# Run server (default: x25519 on localhost:4433)
|
# Run server (default: x25519 on localhost:4433)
|
||||||
|
[group("run")]
|
||||||
server mode="x25519" listen="127.0.0.1:4433":
|
server mode="x25519" listen="127.0.0.1:4433":
|
||||||
cargo run --release --bin server -- --mode {{mode}} --listen {{listen}}
|
cargo run --release --bin server -- --mode {{mode}} --listen {{listen}}
|
||||||
|
|
||||||
# Run benchmark runner
|
# Run benchmark runner
|
||||||
|
[group("run")]
|
||||||
runner server mode="x25519" payload="1024" iters="100" warmup="10":
|
runner server mode="x25519" payload="1024" iters="100" warmup="10":
|
||||||
cargo run --release --bin runner -- \
|
cargo run --release --bin runner -- \
|
||||||
--server {{server}} \
|
--server {{server}} \
|
||||||
@@ -51,10 +73,9 @@ runner server mode="x25519" payload="1024" iters="100" warmup="10":
|
|||||||
--iters {{iters}} \
|
--iters {{iters}} \
|
||||||
--warmup {{warmup}}
|
--warmup {{warmup}}
|
||||||
|
|
||||||
# Clean build artifacts
|
# Run benchmark runner from a config file
|
||||||
clean:
|
[group("run")]
|
||||||
cargo clean
|
benchmark config="benchmarks.toml":
|
||||||
|
cargo run --release --bin runner -- \
|
||||||
|
--config {{config}}
|
||||||
|
|
||||||
# Install dev dependencies
|
|
||||||
setup:
|
|
||||||
cargo install cargo-nextest
|
|
||||||
|
|||||||
Reference in New Issue
Block a user