pub struct CaptureSchedule {
pub prefill: bool,
pub decode: bool,
pub first_prediction: u64,
pub end_prediction: Option<u64>,
pub every: u64,
}Expand description
Half-open selection of prediction indices (zero is the prefill prediction).
Fields§
§prefill: boolWhether prompt-prefill observations are selected.
decode: boolWhether cached-decode observations are selected.
first_prediction: u64First selected prediction index, inclusive.
end_prediction: Option<u64>Exclusive end of the prediction range; absent means the request limit.
every: u64Capture every Nth prediction relative to first_prediction; must be positive.
Implementations§
Source§impl CaptureSchedule
impl CaptureSchedule
Sourcepub fn count_and_last(
&self,
phase: CapturePhase,
maximum: u64,
) -> Result<Option<(u64, u64)>, CaptureError>
pub fn count_and_last( &self, phase: CapturePhase, maximum: u64, ) -> Result<Option<(u64, u64)>, CaptureError>
Returns selected prediction count and last index within a bounded run.
Sourcepub fn count_and_last_from(
&self,
phase: CapturePhase,
next_prediction: u64,
maximum: u64,
) -> Result<Option<(u64, u64)>, CaptureError>
pub fn count_and_last_from( &self, phase: CapturePhase, next_prediction: u64, maximum: u64, ) -> Result<Option<(u64, u64)>, CaptureError>
Counts the remaining absolute schedule without moving its frequency
origin when a continuation resumes at next_prediction.
Sourcepub fn includes(&self, phase: CapturePhase, prediction: u64) -> bool
pub fn includes(&self, phase: CapturePhase, prediction: u64) -> bool
Whether a phase and prediction are selected by this schedule.
Trait Implementations§
Source§impl Clone for CaptureSchedule
impl Clone for CaptureSchedule
Source§fn clone(&self) -> CaptureSchedule
fn clone(&self) -> CaptureSchedule
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 moreSource§impl Debug for CaptureSchedule
impl Debug for CaptureSchedule
Source§impl Default for CaptureSchedule
impl Default for CaptureSchedule
Source§impl<'de> Deserialize<'de> for CaptureSchedule
impl<'de> Deserialize<'de> for CaptureSchedule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CaptureSchedule
Source§impl PartialEq for CaptureSchedule
impl PartialEq for CaptureSchedule
Source§impl Serialize for CaptureSchedule
impl Serialize for CaptureSchedule
impl StructuralPartialEq for CaptureSchedule
Auto Trait Implementations§
impl Freeze for CaptureSchedule
impl RefUnwindSafe for CaptureSchedule
impl Send for CaptureSchedule
impl Sync for CaptureSchedule
impl Unpin for CaptureSchedule
impl UnsafeUnpin for CaptureSchedule
impl UnwindSafe for CaptureSchedule
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