pub struct RayonProfile {
pub wall_time_us: f64,
pub single_thread_time_us: f64,
pub parallel_speedup: f64,
pub num_threads: usize,
pub parallel_efficiency: f64,
pub heijunka_score: f64,
pub thread_spawn_overhead_us: f64,
pub work_steal_count: u64,
}Expand description
Rayon parallel profile output.
Fields§
§wall_time_us: f64§single_thread_time_us: f64§parallel_speedup: f64§num_threads: usize§parallel_efficiency: f64§heijunka_score: f640.0 = perfect balance, 1.0 = all work on 1 thread.
thread_spawn_overhead_us: f64§work_steal_count: u64Implementations§
Source§impl RayonProfile
impl RayonProfile
Sourcepub fn compute_heijunka_score(per_thread_times: &[f64]) -> f64
pub fn compute_heijunka_score(per_thread_times: &[f64]) -> f64
Compute Heijunka (load balance) score from per-thread work times. Score = coefficient of variation of per-thread times. 0.0 = perfect balance, higher = more imbalanced.
Sourcepub fn compute_speedup(single_thread_us: f64, parallel_us: f64) -> f64
pub fn compute_speedup(single_thread_us: f64, parallel_us: f64) -> f64
Estimate parallel speedup from single-thread and multi-thread wall times.
Sourcepub fn compute_efficiency(speedup: f64, num_threads: usize) -> f64
pub fn compute_efficiency(speedup: f64, num_threads: usize) -> f64
Compute parallel efficiency: speedup / num_threads (1.0 = ideal).
Trait Implementations§
Source§impl Clone for RayonProfile
impl Clone for RayonProfile
Source§fn clone(&self) -> RayonProfile
fn clone(&self) -> RayonProfile
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 RayonProfile
impl Debug for RayonProfile
Source§impl<'de> Deserialize<'de> for RayonProfile
impl<'de> Deserialize<'de> for RayonProfile
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 RayonProfile
impl RefUnwindSafe for RayonProfile
impl Send for RayonProfile
impl Sync for RayonProfile
impl Unpin for RayonProfile
impl UnsafeUnpin for RayonProfile
impl UnwindSafe for RayonProfile
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