pub struct CodeCoverageSensor {
    pub count_instrumented: usize,
    /* private fields */
}
Expand description

A sensor that automatically records the code coverage of the program through an array of counters.

This is the default sensor used by fuzzcheck. It can filter the recorded code coverage so that only some files influence the fuzzer.

By default, coverage is recorded only for the files whose given paths are relative to the current directory. This is a heuristic to observe only the crate being tested. However, this behaviour can be changed. When creating a new CodeCoverageSensor, you can pass a function that determines whether coverage is recorded for a file with a given path.

use fuzzcheck::sensors_and_pools::CodeCoverageSensor;
let sensor = CodeCoverageSensor::new(|path| path.is_relative() == true);

Fields

count_instrumented: usize

The number of code regions observed by the sensor

Implementations

Trait Implementations

Save information about self to the stats folder Read more

Signal to the sensor that it should prepare to record observations

Signal to the sensor that it should stop recording observations

Access the sensor’s observations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Maps the observations of the sensor using the given closure. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.