pub struct TimingResult {
pub name: String,
pub samples: usize,
pub samples_after_crop: usize,
pub t_value: f64,
pub passed: bool,
pub threshold: f64,
pub mean_left: f64,
pub mean_right: f64,
pub std_left: f64,
pub std_right: f64,
}Expand description
Result of a timing analysis test.
Fields§
§name: StringName of the test
samples: usizeNumber of raw samples collected
samples_after_crop: usizeNumber of samples after cropping
t_value: f64Welch’s t-statistic
passed: boolWhether the test passed (no leak detected)
threshold: f64Threshold used for detection
mean_left: f64Mean timing for left class (nanoseconds)
mean_right: f64Mean timing for right class (nanoseconds)
std_left: f64Standard deviation for left class
std_right: f64Standard deviation for right class
Implementations§
Source§impl TimingResult
impl TimingResult
Sourcepub fn is_constant_time(&self) -> bool
pub fn is_constant_time(&self) -> bool
Check if the operation is constant-time.
Sourcepub fn abs_t_value(&self) -> f64
pub fn abs_t_value(&self) -> f64
Get the absolute t-value.
Sourcepub fn timing_difference_percent(&self) -> f64
pub fn timing_difference_percent(&self) -> f64
Get timing difference as percentage of mean.
Sourcepub fn detailed_report(&self) -> String
pub fn detailed_report(&self) -> String
Get detailed report.
Trait Implementations§
Source§impl Clone for TimingResult
impl Clone for TimingResult
Source§fn clone(&self) -> TimingResult
fn clone(&self) -> TimingResult
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 TimingResult
impl Debug for TimingResult
Auto Trait Implementations§
impl Freeze for TimingResult
impl RefUnwindSafe for TimingResult
impl Send for TimingResult
impl Sync for TimingResult
impl Unpin for TimingResult
impl UnwindSafe for TimingResult
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