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

Method update

hail-fuzz/src/monitor.rs:93–110  ·  view source on GitHub ↗
(&mut self, fuzzer: &Fuzzer)

Source from the content-addressed store, hash-verified

91 }
92
93 pub fn update(&mut self, fuzzer: &Fuzzer) {
94 let blocks_seen = fuzzer.vm.code.blocks.len() as u64;
95 if blocks_seen != self.blocks_seen {
96 self.blocks_seen = blocks_seen;
97 self.last_coverage_increase = Instant::now();
98 }
99 else {
100 // Note: we only update the max time if the number of blocks seen doesn't increase to
101 // avoid counting the JIT compilation time.
102 self.max_duration = fuzzer.state.exec_time.max(self.max_duration);
103 }
104
105 self.max_instructions = fuzzer.state.instructions.max(self.max_instructions);
106 self.input_id = fuzzer.input_id.unwrap_or(0);
107 self.stage = fuzzer.stage;
108
109 self.log(fuzzer);
110 }
111
112 pub fn log(&mut self, fuzzer: &Fuzzer) {
113 let elapsed_time = self.last_report.elapsed();

Callers 2

update_statsMethod · 0.45
maybe_syncMethod · 0.45

Calls 5

was_crashMethod · 0.80
was_hangMethod · 0.80
maybe_syncMethod · 0.80
lenMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected