MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / new

Method new

hail-fuzz/src/monitor.rs:68–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67impl Monitor {
68 pub fn new() -> Self {
69 let log_rate = match std::env::var("STATS_LOG_RATE") {
70 Ok(time) => Duration::from_secs_f64(time.parse::<f64>().unwrap()),
71 Err(_) => Duration::from_secs(1),
72 };
73
74 Self {
75 total_executions: 0,
76 crashes: 0,
77 timeouts: 0,
78 blocks_seen: 0,
79 start_time: Instant::now(),
80 log_rate,
81 last_log_time: Instant::now(),
82 last_coverage_increase: Instant::now(),
83 last_report: Instant::now(),
84 max_duration: Duration::ZERO,
85 max_instructions: 0,
86 last_exec_count: 0,
87 last_dict_items: 0,
88 input_id: 0,
89 stage: Stage::Import,
90 }
91 }
92
93 pub fn update(&mut self, fuzzer: &Fuzzer) {
94 let blocks_seen = fuzzer.vm.code.blocks.len() as u64;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected