libafl: MultiStats UI padding

This commit is contained in:
Andrea Fioraldi 2021-05-21 17:47:48 +02:00
parent 349cc7b886
commit 3809a85df3
2 changed files with 5 additions and 4 deletions

View File

@ -20,7 +20,7 @@ which = { version = "4.0.2" }
num_cpus = "1.0" num_cpus = "1.0"
[dependencies] [dependencies]
libafl = { path = "../../libafl/", features = ["default", "introspection"] } libafl = { path = "../../libafl/", features = ["default"] }
# libafl = { path = "../../libafl/", features = ["default"] } # libafl = { path = "../../libafl/", features = ["default"] }
libafl_targets = { path = "../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] } libafl_targets = { path = "../../libafl_targets/", features = ["sancov_pcguard_hitcounts", "libfuzzer"] }
# TODO Include it only when building cc # TODO Include it only when building cc

View File

@ -43,12 +43,13 @@ where
} }
fn display(&mut self, event_msg: String, sender_id: u32) { fn display(&mut self, event_msg: String, sender_id: u32) {
let pad = if event_msg.len() < 9 { let sender = format!("#{}", sender_id);
" ".repeat(9 - event_msg.len()) let pad = if event_msg.len() + sender.len() < 13 {
" ".repeat(13 - event_msg.len() - sender.len())
} else { } else {
String::new() String::new()
}; };
let head = format!("{}{} #{}", event_msg, pad, sender_id); let head = format!("{}{} {}", event_msg, pad, sender_id);
let global_fmt = format!( let global_fmt = format!(
"[{}] (GLOBAL) clients: {}, corpus: {}, objectives: {}, executions: {}, exec/sec: {}", "[{}] (GLOBAL) clients: {}, corpus: {}, objectives: {}, executions: {}, exec/sec: {}",
head, head,