pub trait Sensor: SaveToStatsFolder + 'static {
type Observations;
fn start_recording(&mut self);
fn stop_recording(&mut self);
fn get_observations(&mut self) -> Self::Observations;
}
Expand description
A Sensor records information when running the test function, which the fuzzer can use to determine the importance of a test case.
For example, the sensor can record the code coverage triggered by the test case, store the source location of a panic, measure the number of allocations made, etc. The observations made by a sensor are then assessed by a Pool, which must be explicitly compatible with the sensor’s observations.
Required Associated Types
type Observations
Required Methods
fn start_recording(&mut self)
fn start_recording(&mut self)
Signal to the sensor that it should prepare to record observations
fn stop_recording(&mut self)
fn stop_recording(&mut self)
Signal to the sensor that it should stop recording observations
fn get_observations(&mut self) -> Self::Observations
fn get_observations(&mut self) -> Self::Observations
Access the sensor’s observations