pub struct SystemProfile {
pub logical_cpus: usize,
pub physical_cpus: Option<usize>,
pub total_memory_mb: u64,
pub available_memory_mb: u64,
pub worker_threads: usize,
pub progress_interval: u64,
pub memory_pressure: MemoryPressure,
pub measured_keys_per_sec: Option<f64>,
}Expand description
Detected host capabilities used to tune the grinder before work starts.
Fields§
§logical_cpus: usize§physical_cpus: Option<usize>§total_memory_mb: u64§available_memory_mb: u64§worker_threads: usize§progress_interval: u64§memory_pressure: MemoryPressure§measured_keys_per_sec: Option<f64>Set after a live benchmark warm-up for accurate ETA.
Implementations§
Source§impl SystemProfile
impl SystemProfile
Sourcepub fn with_benchmark(self, keys_per_sec: f64) -> Self
pub fn with_benchmark(self, keys_per_sec: f64) -> Self
Store a live benchmark result from benchmark().
Sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Override thread count (e.g. from --threads CLI flag).
pub fn summary_line(&self) -> String
pub fn cpu_description(&self) -> String
pub fn worker_description(&self) -> String
pub fn estimated_keys_per_sec(&self, chain_id: &str) -> f64
Trait Implementations§
Source§impl Clone for SystemProfile
impl Clone for SystemProfile
Source§fn clone(&self) -> SystemProfile
fn clone(&self) -> SystemProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SystemProfile
impl RefUnwindSafe for SystemProfile
impl Send for SystemProfile
impl Sync for SystemProfile
impl Unpin for SystemProfile
impl UnsafeUnpin for SystemProfile
impl UnwindSafe for SystemProfile
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