Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/bench/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
duration: 60
runs: 1
cores: "0"
timeout_ms: 1000
share_dir: /tmp/fuzzamoto_share
corpus_seed: /tmp/bench-corpus
fuzzer_path: target/release/fuzzamoto-libafl
bench_snapshot_secs: 30
43 changes: 43 additions & 0 deletions .github/workflows/benchmark-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Benchmark Smoke Test

on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"

jobs:
benchmark:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install nyx dependencies
run: sudo apt update && sudo apt install -y libgtk-3-dev pax-utils python3-msgpack python3-jinja2 libcapstone-dev
- name: Build CLI and fuzzer
run: cargo build --release --package fuzzamoto-cli --package fuzzamoto-libafl --features bench
- name: Run headless benchmark artifact checks
run: |
cargo test -p fuzzamoto-cli

mkdir -p /tmp/bench-base /tmp/bench-cand
cat > /tmp/bench-base/summary.json <<'JSON'
{"final_elapsed_s":60.0,"total_execs":120000,"mean_execs_per_sec":2000.0,"max_coverage_pct":5.0,"final_corpus_size":150}
JSON
cat > /tmp/bench-cand/summary.json <<'JSON'
{"final_elapsed_s":60.0,"total_execs":135000,"mean_execs_per_sec":2250.0,"max_coverage_pct":5.3,"final_corpus_size":160}
JSON
./target/release/fuzzamoto-cli benchmark compare --baseline /tmp/bench-base --candidate /tmp/bench-cand

mkdir -p /tmp/suite-base /tmp/suite-cand
cat > /tmp/suite-base/suite_summary.json <<'JSON'
{"runs":1,"coverage_mean":5.0,"corpus_mean":150.0}
JSON
cat > /tmp/suite-cand/suite_summary.json <<'JSON'
{"runs":1,"coverage_mean":5.3,"corpus_mean":160.0}
JSON
./target/release/fuzzamoto-cli benchmark compare --baseline /tmp/suite-base --candidate /tmp/suite-cand --suite
5 changes: 5 additions & 0 deletions fuzzamoto-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ env_logger = "0.11.6"
log = "0.4.25"
postcard = { version = "1.1.1", features = ["alloc"], default-features = false }
rand = { version = "0.8.5", features = ["small_rng"] }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"

fuzzamoto = { path = "../fuzzamoto" }
fuzzamoto-ir = { path = "../fuzzamoto-ir" }
serde_json = "1.0.140"

[target.'cfg(unix)'.dependencies]
nix = { version = "0.29", features = ["signal"] }
Loading
Loading