pub struct BenchResults { /* private fields */ }Expand description
Stores benchmark results for multiple file watchers
Implementations§
Source§impl BenchResults
impl BenchResults
pub fn new() -> Self
Sourcepub fn with_sample_data() -> Self
pub fn with_sample_data() -> Self
Add pre-populated sample benchmark results for demonstration purposes
pub fn add_result(&mut self, name: &str, result: WatcherResult)
Sourcepub fn best_performer(&self, metric: BenchMetric) -> Option<(&String, f64)>
pub fn best_performer(&self, metric: BenchMetric) -> Option<(&String, f64)>
Get the best performer for a specific metric
Sourcepub fn flash_improvement(&self) -> HashMap<BenchMetric, f64>
pub fn flash_improvement(&self) -> HashMap<BenchMetric, f64>
Calculate how much faster/better Flash is compared to the average
Sourcepub fn print_chart(&self, metric: BenchMetric)
pub fn print_chart(&self, metric: BenchMetric)
Print a comparison bar chart for a specific metric
Sourcepub fn print_report(&self)
pub fn print_report(&self)
Print a summary report of all benchmark results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BenchResults
impl RefUnwindSafe for BenchResults
impl Send for BenchResults
impl Sync for BenchResults
impl Unpin for BenchResults
impl UnwindSafe for BenchResults
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more