pub struct BenchmarkHistory {
pub results: HashMap<String, VecDeque<BenchmarkResult>>,
pub max_history_length: usize,
}Expand description
Historical benchmark results with time series data
Fields§
§results: HashMap<String, VecDeque<BenchmarkResult>>Benchmark results indexed by benchmark name
max_history_length: usizeMaximum history length to keep
Implementations§
Source§impl BenchmarkHistory
impl BenchmarkHistory
Sourcepub fn new(max_history_length: usize) -> Self
pub fn new(max_history_length: usize) -> Self
Create a new benchmark history with specified capacity
Sourcepub fn add_result(&mut self, name: String, result: BenchmarkResult)
pub fn add_result(&mut self, name: String, result: BenchmarkResult)
Add a benchmark result to history
Sourcepub fn get_history(&self, name: &str) -> Option<&VecDeque<BenchmarkResult>>
pub fn get_history(&self, name: &str) -> Option<&VecDeque<BenchmarkResult>>
Get historical results for a benchmark
Sourcepub fn get_summary(&self, name: &str) -> Option<HistoricalSummary>
pub fn get_summary(&self, name: &str) -> Option<HistoricalSummary>
Get statistical summary of historical performance
Trait Implementations§
Source§impl Clone for BenchmarkHistory
impl Clone for BenchmarkHistory
Source§fn clone(&self) -> BenchmarkHistory
fn clone(&self) -> BenchmarkHistory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BenchmarkHistory
impl RefUnwindSafe for BenchmarkHistory
impl Send for BenchmarkHistory
impl Sync for BenchmarkHistory
impl Unpin for BenchmarkHistory
impl UnwindSafe for BenchmarkHistory
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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