pub struct ShellEfficiencyProfile { /* private fields */ }Expand description
Owns the shell-efficiency rings and lifetime counters folded from every
per-instance worker’s drained ShellEfficiencyFacts. Lives behind an
Arc<Mutex<_>> shared by NativeEffectDispatcher and every
NativeWorkerContext it spawns, since multiple worker tasks fold into
it concurrently – locked only for one fold, never across an
.await, same rule as gate4agent-node’s DriveLoopProfiler.
Implementations§
Source§impl ShellEfficiencyProfile
impl ShellEfficiencyProfile
Sourcepub fn fold(&mut self, facts: &ShellEfficiencyFacts)
pub fn fold(&mut self, facts: &ShellEfficiencyFacts)
Fold one drained ShellEfficiencyFacts in – every raw duration/byte
sample becomes a RingStats::push, every counter adds with
saturating arithmetic so a lifetime u64 total can never wrap.
pub fn snapshot(&self) -> ShellEfficiencyProfileSnapshot
Trait Implementations§
Source§impl Clone for ShellEfficiencyProfile
impl Clone for ShellEfficiencyProfile
Source§impl Debug for ShellEfficiencyProfile
impl Debug for ShellEfficiencyProfile
Auto Trait Implementations§
impl Freeze for ShellEfficiencyProfile
impl RefUnwindSafe for ShellEfficiencyProfile
impl Send for ShellEfficiencyProfile
impl Sync for ShellEfficiencyProfile
impl Unpin for ShellEfficiencyProfile
impl UnsafeUnpin for ShellEfficiencyProfile
impl UnwindSafe for ShellEfficiencyProfile
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