pub struct DispatchHistory { /* private fields */ }Expand description
One instance per device, codec configuration and worker arrangement. Bucket medians describe only observations supplied by the caller.
Implementations§
Source§impl DispatchHistory
impl DispatchHistory
Sourcepub fn execute<T, E>(
&self,
class: WorkClass,
count: usize,
max_extra_per_mille: u16,
cpu: impl FnOnce() -> Result<T, E>,
gpu: impl FnOnce() -> Result<T, E>,
) -> Result<(T, Route, Option<E>), E>
pub fn execute<T, E>( &self, class: WorkClass, count: usize, max_extra_per_mille: u16, cpu: impl FnOnce() -> Result<T, E>, gpu: impl FnOnce() -> Result<T, E>, ) -> Result<(T, Route, Option<E>), E>
Execute an independently scheduled batch, reporting device failures even when CPU recovers.
pub fn record( &mut self, class: WorkClass, count: usize, cpu: Observation, gpu: Observation, )
Trait Implementations§
Auto Trait Implementations§
impl Forget for DispatchHistory
impl Freeze for DispatchHistory
impl Move for DispatchHistory
impl RefUnwindSafe for DispatchHistory
impl Send for DispatchHistory
impl Sync for DispatchHistory
impl Unpin for DispatchHistory
impl UnsafeUnpin for DispatchHistory
impl UnwindSafe for DispatchHistory
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