Skip to content

Commit

Permalink
clip
Browse files Browse the repository at this point in the history
  • Loading branch information
domenukk committed Jan 13, 2025
1 parent 3a063a3 commit 974062b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions libafl/examples/tui_mock/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ use libafl_bolts::ClientId;
pub fn main() {
let mut monitor = TuiMonitor::builder().build();

let mut client_stats = ClientStats::default();

client_stats.corpus_size = 1024;
client_stats.executions = 512;
let client_stats = ClientStats {
corpus_size: 1024,
executions: 512,
..ClientStats::default()
};

monitor.display("Test", ClientId(0));
sleep(Duration::from_secs(10));
Expand Down
6 changes: 3 additions & 3 deletions libafl/src/stages/afl_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ impl Display for AFLPlotData<'_> {
}
}
impl AFLPlotData<'_> {
fn get_header() -> &'static str {
fn header() -> &'static str {
"# relative_time, cycles_done, cur_item, corpus_count, pending_total, pending_favs, total_edges, saved_crashes, saved_hangs, max_depth, execs_per_sec, execs_done, edges_found"
}
}
Expand Down Expand Up @@ -767,10 +767,10 @@ where
// check if it contains any data
let file = File::open(path)?;
if BufReader::new(file).lines().next().is_none() {
std::fs::write(path, AFLPlotData::get_header())?;
std::fs::write(path, AFLPlotData::header())?;
}
} else {
std::fs::write(path, AFLPlotData::get_header())?;
std::fs::write(path, AFLPlotData::header())?;
}
Ok(())
}
Expand Down

0 comments on commit 974062b

Please sign in to comment.