pub struct QueueStats {
pub total_pushed: u64,
pub total_popped: u64,
pub total_rejected: u64,
}Expand description
Lifetime throughput statistics for a WorkQueue.
§Examples
use oximedia_core::work_queue::{WorkItem, WorkQueue};
let mut q: WorkQueue<()> = WorkQueue::new(16);
q.push(WorkItem::new((), 1)).expect("queue not full");
let _ = q.pop();
let stats = q.stats();
assert_eq!(stats.total_pushed, 1);
assert_eq!(stats.total_popped, 1);Fields§
§total_pushed: u64Cumulative number of items successfully pushed.
total_popped: u64Cumulative number of items removed via pop or pop_batch.
total_rejected: u64Cumulative number of push attempts that were rejected due to capacity.
Implementations§
Trait Implementations§
Source§impl Clone for QueueStats
impl Clone for QueueStats
Source§fn clone(&self) -> QueueStats
fn clone(&self) -> QueueStats
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 QueueStats
impl Debug for QueueStats
Source§impl Default for QueueStats
impl Default for QueueStats
Source§fn default() -> QueueStats
fn default() -> QueueStats
Returns the “default value” for a type. Read more
Source§impl PartialEq for QueueStats
impl PartialEq for QueueStats
impl Copy for QueueStats
impl Eq for QueueStats
impl StructuralPartialEq for QueueStats
Auto Trait Implementations§
impl Freeze for QueueStats
impl RefUnwindSafe for QueueStats
impl Send for QueueStats
impl Sync for QueueStats
impl Unpin for QueueStats
impl UnsafeUnpin for QueueStats
impl UnwindSafe for QueueStats
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