StatisticsCollector

Struct StatisticsCollector 

Source
pub struct StatisticsCollector { /* private fields */ }
Expand description

Statistics collector that tracks generation patterns and performance

Implementations§

Source§

impl StatisticsCollector

Source

pub fn new() -> Self

Create a new statistics collector

Source

pub fn disabled() -> Self

Create a disabled statistics collector (for performance)

Source

pub fn enable(&mut self)

Enable statistics collection

Source

pub fn disable(&mut self)

Disable statistics collection

Source

pub fn is_enabled(&self) -> bool

Check if statistics collection is enabled

Source

pub fn start_generation_timing(&mut self)

Start timing a generation operation

Source

pub fn end_generation_timing(&mut self)

End timing a generation operation and record the duration

Source

pub fn record_generated_value<T: Any + Debug>( &mut self, value: &T, type_name: &str, )

Record a generated value for statistics

Source

pub fn record_enum_variant( &mut self, type_name: &str, variant_name: &str, total_variants: usize, )

Record an enum variant

Source

pub fn record_collection_size(&mut self, type_name: &str, size: usize)

Record a collection size directly

Source

pub fn add_custom_coverage( &mut self, type_name: String, coverage: Box<dyn CustomCoverage + Send + Sync>, )

Add custom coverage tracking

Source

pub fn get_stats(&self) -> &GenerationStats

Get the current statistics

Source

pub fn get_stats_mut(&mut self) -> &mut GenerationStats

Get a mutable reference to the current statistics

Source

pub fn into_stats(self) -> GenerationStats

Take ownership of the statistics (consuming the collector)

Source

pub fn reset(&mut self)

Reset all statistics

Source

pub fn generate_analysis_report(&self) -> String

Generate a detailed analysis report

Source

pub fn check_coverage_and_recommend( &self, thresholds: &CoverageThresholds, ) -> (CoverageReport, Vec<String>)

Check coverage against thresholds and generate recommendations

Trait Implementations§

Source§

impl Default for StatisticsCollector

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V