pub struct ProfileSnapshot {
pub total_sends: u64,
pub batch_sends: u64,
pub batch_size_sum: u64,
pub max_batch_size: u64,
}Expand description
Profile counters tracked at every send. AdaptiveIpc::maybe_promote
inspects these and decides whether to migrate.
Fields§
§total_sends: u64Total individual sends since last reset.
batch_sends: u64Total batched sends since last reset.
batch_size_sum: u64Sum of all batch sizes seen.
max_batch_size: u64Maximum batch size observed.
Implementations§
Source§impl ProfileSnapshot
impl ProfileSnapshot
Sourcepub fn avg_batch_size(&self) -> u64
pub fn avg_batch_size(&self) -> u64
Average batch size across observed batched calls (1 if none).
Sourcepub fn batch_ratio(&self) -> f64
pub fn batch_ratio(&self) -> f64
Ratio of batched calls to total calls in [0.0, 1.0].
Sourcepub fn inferred_shape(&self, n_consumers: usize) -> MmfWorkloadShape
pub fn inferred_shape(&self, n_consumers: usize) -> MmfWorkloadShape
Infer a workload shape from observed patterns.
Trait Implementations§
Source§impl Clone for ProfileSnapshot
impl Clone for ProfileSnapshot
Source§fn clone(&self) -> ProfileSnapshot
fn clone(&self) -> ProfileSnapshot
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 moreimpl Copy for ProfileSnapshot
Source§impl Debug for ProfileSnapshot
impl Debug for ProfileSnapshot
Source§impl Default for ProfileSnapshot
impl Default for ProfileSnapshot
Source§fn default() -> ProfileSnapshot
fn default() -> ProfileSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProfileSnapshot
impl RefUnwindSafe for ProfileSnapshot
impl Send for ProfileSnapshot
impl Sync for ProfileSnapshot
impl Unpin for ProfileSnapshot
impl UnsafeUnpin for ProfileSnapshot
impl UnwindSafe for ProfileSnapshot
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