pub struct DenseStreamTelemetry { /* private fields */ }Expand description
Backend-neutral lifecycle and aggregation state for dense-stream telemetry.
Implementations§
Source§impl DenseStreamTelemetry
impl DenseStreamTelemetry
Sourcepub fn new(
planned_layer_count: usize,
planned_layer_bytes: u64,
maximum_host_layer_bytes: u64,
pinned_static_device_bytes: u64,
transfer_stream_index: i32,
groups: impl IntoIterator<Item = (String, Vec<OffloadUnitId>)>,
) -> Self
pub fn new( planned_layer_count: usize, planned_layer_bytes: u64, maximum_host_layer_bytes: u64, pinned_static_device_bytes: u64, transfer_stream_index: i32, groups: impl IntoIterator<Item = (String, Vec<OffloadUnitId>)>, ) -> Self
Creates telemetry state for a fixed execution-group and residency plan.
Sourcepub fn begin_forward(
&self,
prefill: bool,
offload: &OffloadReport,
) -> Result<(), DenseStreamTelemetryError>
pub fn begin_forward( &self, prefill: bool, offload: &OffloadReport, ) -> Result<(), DenseStreamTelemetryError>
Starts attribution for one prefill or decode pass.
Sourcepub fn observe_group(
&self,
group: &str,
prefill: bool,
units: &[UnitResidencyReport],
) -> Result<(), DenseStreamTelemetryError>
pub fn observe_group( &self, group: &str, prefill: bool, units: &[UnitResidencyReport], ) -> Result<(), DenseStreamTelemetryError>
Records current group and whole-plan occupancy during an active pass.
Sourcepub fn record_group_execution(
&self,
group: &str,
) -> Result<(), DenseStreamTelemetryError>
pub fn record_group_execution( &self, group: &str, ) -> Result<(), DenseStreamTelemetryError>
Records successful completion of one named execution group.
Sourcepub fn commit_forward(
&self,
offload: &OffloadReport,
) -> Result<(), DenseStreamTelemetryError>
pub fn commit_forward( &self, offload: &OffloadReport, ) -> Result<(), DenseStreamTelemetryError>
Commits counter deltas and occupancy peaks for the active pass.
Sourcepub fn abort_forward(&self)
pub fn abort_forward(&self)
Aborts the active pass without committing partial counter deltas.
Sourcepub fn report(
&self,
residency: ResidencyReport,
background: BackgroundPrefetchReport,
) -> Result<DenseDiskStreamReport, DenseStreamTelemetryError>
pub fn report( &self, residency: ResidencyReport, background: BackgroundPrefetchReport, ) -> Result<DenseDiskStreamReport, DenseStreamTelemetryError>
Builds a stable report from a coherent residency and worker snapshot.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DenseStreamTelemetry
impl RefUnwindSafe for DenseStreamTelemetry
impl Send for DenseStreamTelemetry
impl Sync for DenseStreamTelemetry
impl Unpin for DenseStreamTelemetry
impl UnsafeUnpin for DenseStreamTelemetry
impl UnwindSafe for DenseStreamTelemetry
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