pub struct StatisticsCollector { /* private fields */ }Expand description
Statistics collector that tracks generation patterns and performance
Implementations§
Source§impl StatisticsCollector
impl StatisticsCollector
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if statistics collection is enabled
Sourcepub fn start_generation_timing(&mut self)
pub fn start_generation_timing(&mut self)
Start timing a generation operation
Sourcepub fn end_generation_timing(&mut self)
pub fn end_generation_timing(&mut self)
End timing a generation operation and record the duration
Sourcepub fn record_generated_value<T: Any + Debug>(
&mut self,
value: &T,
type_name: &str,
)
pub fn record_generated_value<T: Any + Debug>( &mut self, value: &T, type_name: &str, )
Record a generated value for statistics
Sourcepub fn record_enum_variant(
&mut self,
type_name: &str,
variant_name: &str,
total_variants: usize,
)
pub fn record_enum_variant( &mut self, type_name: &str, variant_name: &str, total_variants: usize, )
Record an enum variant
Sourcepub fn record_collection_size(&mut self, type_name: &str, size: usize)
pub fn record_collection_size(&mut self, type_name: &str, size: usize)
Record a collection size directly
Sourcepub fn add_custom_coverage(
&mut self,
type_name: String,
coverage: Box<dyn CustomCoverage + Send + Sync>,
)
pub fn add_custom_coverage( &mut self, type_name: String, coverage: Box<dyn CustomCoverage + Send + Sync>, )
Add custom coverage tracking
Sourcepub fn get_stats(&self) -> &GenerationStats
pub fn get_stats(&self) -> &GenerationStats
Get the current statistics
Sourcepub fn get_stats_mut(&mut self) -> &mut GenerationStats
pub fn get_stats_mut(&mut self) -> &mut GenerationStats
Get a mutable reference to the current statistics
Sourcepub fn into_stats(self) -> GenerationStats
pub fn into_stats(self) -> GenerationStats
Take ownership of the statistics (consuming the collector)
Sourcepub fn generate_analysis_report(&self) -> String
pub fn generate_analysis_report(&self) -> String
Generate a detailed analysis report
Sourcepub fn check_coverage_and_recommend(
&self,
thresholds: &CoverageThresholds,
) -> (CoverageReport, Vec<String>)
pub fn check_coverage_and_recommend( &self, thresholds: &CoverageThresholds, ) -> (CoverageReport, Vec<String>)
Check coverage against thresholds and generate recommendations
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatisticsCollector
impl !RefUnwindSafe for StatisticsCollector
impl Send for StatisticsCollector
impl Sync for StatisticsCollector
impl Unpin for StatisticsCollector
impl !UnwindSafe for StatisticsCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more