pub struct PerformanceProfile {
pub measurements: HashMap<String, Vec<Measurement>>,
pub start_time: Option<Instant>,
pub duration_ms: Option<u64>,
pub test_name: String,
}Expand description
A performance profile containing all measurements
Fields§
§measurements: HashMap<String, Vec<Measurement>>All measurements grouped by name
start_time: Option<Instant>Profile start time
duration_ms: Option<u64>Profile duration
test_name: StringTest name
Implementations§
Source§impl PerformanceProfile
impl PerformanceProfile
Sourcepub fn add(&mut self, measurement: Measurement)
pub fn add(&mut self, measurement: Measurement)
Add a measurement
Sourcepub fn stats(&self, name: &str) -> Option<MetricStats>
pub fn stats(&self, name: &str) -> Option<MetricStats>
Get statistics for a metric
Sourcepub fn metric_names(&self) -> Vec<String>
pub fn metric_names(&self) -> Vec<String>
Get all metric names
Sourcepub fn measurement_count(&self) -> usize
pub fn measurement_count(&self) -> usize
Get total measurement count
Sourcepub fn check_thresholds(
&self,
thresholds: &[PerformanceThreshold],
) -> ProbarResult<()>
pub fn check_thresholds( &self, thresholds: &[PerformanceThreshold], ) -> ProbarResult<()>
Check thresholds
Sourcepub fn summary(&self) -> PerformanceSummary
pub fn summary(&self) -> PerformanceSummary
Generate a summary report
Trait Implementations§
Source§impl Clone for PerformanceProfile
impl Clone for PerformanceProfile
Source§fn clone(&self) -> PerformanceProfile
fn clone(&self) -> PerformanceProfile
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 moreSource§impl Debug for PerformanceProfile
impl Debug for PerformanceProfile
Source§impl Default for PerformanceProfile
impl Default for PerformanceProfile
Source§fn default() -> PerformanceProfile
fn default() -> PerformanceProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PerformanceProfile
impl<'de> Deserialize<'de> for PerformanceProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PerformanceProfile
impl RefUnwindSafe for PerformanceProfile
impl Send for PerformanceProfile
impl Sync for PerformanceProfile
impl Unpin for PerformanceProfile
impl UnsafeUnpin for PerformanceProfile
impl UnwindSafe for PerformanceProfile
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