Skip to content

Commit

Permalink
Tune fuzzer for better throughput
Browse files Browse the repository at this point in the history
This does not affect coverage metrics and makes it ~3x faster
  • Loading branch information
cberner committed Nov 21, 2023
1 parent f538261 commit a1303ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/fuzz_redb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use redb::backends::FileBackend;
use crate::FuzzerSavepoint::{Ephemeral, NotYetDurablePersistent, Persistent};

// These slow down the fuzzer, so don't create too many
const MAX_PERSISTENT_SAVEPOINTS: usize = 20;
const MAX_PERSISTENT_SAVEPOINTS: usize = 10;
// Table to count which transactions have been successfully committed so that the reference BtreeMap can be kept in sync
const COUNTER_TABLE: TableDefinition<(), u64> = TableDefinition::new("transaction_counter");
const TABLE_DEF: TableDefinition<u64, &[u8]> = TableDefinition::new("fuzz_table");
Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ watch +args='test':
cargo watch --clear --exec "{{args}}"

fuzz: pre
cargo fuzz run --sanitizer=none fuzz_redb -- -max_len=100000
cargo fuzz run --sanitizer=none fuzz_redb -- -max_len=10000

fuzz_cmin:
cargo fuzz cmin --sanitizer=none fuzz_redb -- -max_len=100000
cargo fuzz cmin --sanitizer=none fuzz_redb -- -max_len=10000

fuzz_ci: pre
cargo fuzz run --sanitizer=none fuzz_redb -- -max_len=100000 -max_total_time=60
cargo fuzz run --sanitizer=none fuzz_redb -- -max_len=10000 -max_total_time=60

fuzz_coverage: pre
#!/usr/bin/env bash
Expand Down

0 comments on commit a1303ff

Please sign in to comment.