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

Method update_stats

hail-fuzz/src/main.rs:835–856  ·  view source on GitHub ↗
(&mut self, stats: &mut monitor::LocalStats)

Source from the content-addressed store, hash-verified

833 }
834
835 fn update_stats(&mut self, stats: &mut monitor::LocalStats) {
836 stats.update(self);
837
838 // Update stats for the parent of the current input.
839 if let Some(id) = self.input_id {
840 let metadata = &mut self.corpus[id].metadata;
841 metadata.time += self.state.exec_time;
842 metadata.execs += 1;
843 metadata.max_find_gap =
844 u64::max(metadata.max_find_gap, metadata.execs - metadata.last_find);
845 if self.state.was_crash() {
846 metadata.crashes += 1;
847 }
848 if self.state.was_hang() {
849 metadata.hangs += 1;
850 }
851 if self.state.new_coverage {
852 metadata.finds += 1;
853 metadata.last_find = metadata.execs;
854 }
855 }
856 }
857
858 fn reset_input_cursor(&mut self) -> anyhow::Result<()> {
859 self.state.input.seek_to_start();

Callers 5

runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
try_execMethod · 0.80

Calls 3

was_crashMethod · 0.80
was_hangMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected