Stop the fuzzer after an hour

This commit is contained in:
Loïc Lecrenier 2023-06-12 15:30:51 +02:00
parent f03d99690d
commit 4e81445d42

View File

@ -130,9 +130,14 @@ fn main() {
let start = std::time::Instant::now(); let start = std::time::Instant::now();
loop { loop {
let total = progression.load(Ordering::Relaxed); let total = progression.load(Ordering::Relaxed);
let elapsed = start.elapsed().as_secs();
if elapsed > 3600 {
// after 1 hour, stop the fuzzer, success
std::process::exit(0);
}
println!( println!(
"Has been running for {:?}. Tested {} new values for a total of {}.", "Has been running for {:?} seconds. Tested {} new values for a total of {}.",
start.elapsed(), elapsed,
total - last_value, total - last_value,
total total
); );