Struct libafl::monitors::ClientStats
source · [−]pub struct ClientStats {
pub corpus_size: u64,
pub executions: u64,
pub objective_size: u64,
pub last_window_time: Duration,
pub user_monitor: HashMap<String, UserStats>,
}
Expand description
A simple struct to keep track of client monitor
Fields
corpus_size: u64
The corpus size for this client
executions: u64
The total executions for this client
objective_size: u64
The size of the objectives corpus for this client
last_window_time: Duration
The last time we got this information
user_monitor: HashMap<String, UserStats>
User-defined monitor
Implementations
sourceimpl ClientStats
impl ClientStats
sourcepub fn update_executions(&mut self, executions: u64, _cur_time: Duration)
pub fn update_executions(&mut self, executions: u64, _cur_time: Duration)
We got a new information about executions for this client, insert them.
sourcepub fn update_corpus_size(&mut self, corpus_size: u64)
pub fn update_corpus_size(&mut self, corpus_size: u64)
We got a new information about corpus size for this client, insert them.
sourcepub fn update_objective_size(&mut self, objective_size: u64)
pub fn update_objective_size(&mut self, objective_size: u64)
We got a new information about objective corpus size for this client, insert them.
sourcepub fn execs_per_sec(&mut self, cur_time: Duration) -> u64
pub fn execs_per_sec(&mut self, cur_time: Duration) -> u64
Get the calculated executions per second for this client
sourcepub fn update_user_stats(&mut self, name: String, value: UserStats)
pub fn update_user_stats(&mut self, name: String, value: UserStats)
Update the user-defined stat with name and value
sourcepub fn get_user_stats(&mut self, name: &str) -> Option<&UserStats>
pub fn get_user_stats(&mut self, name: &str) -> Option<&UserStats>
Get a user-defined stat using the name
Trait Implementations
sourceimpl Clone for ClientStats
impl Clone for ClientStats
sourcefn clone(&self) -> ClientStats
fn clone(&self) -> ClientStats
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientStats
impl Debug for ClientStats
sourceimpl Default for ClientStats
impl Default for ClientStats
sourcefn default() -> ClientStats
fn default() -> ClientStats
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ClientStats
impl Send for ClientStats
impl Sync for ClientStats
impl Unpin for ClientStats
impl UnwindSafe for ClientStats
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.