pub struct PipelineStats {Show 13 fields
pub decode: PhaseTimer,
pub demosaic: PhaseTimer,
pub normalize: PhaseTimer,
pub wb_hl_ccm: PhaseTimer,
pub oetf: PhaseTimer,
pub pack: PhaseTimer,
pub gpu: PhaseTimer,
pub encode_push: PhaseTimer,
pub setup: PhaseTimer,
pub finalize: PhaseTimer,
pub frames_total: AtomicU64,
pub gpu_frames: AtomicU64,
pub encode_push_per_frame: Mutex<Vec<(u32, Duration)>>,
}Expand description
All phase timers for one pipeline run. Arc<PipelineStats> is shared
across the loader / processor / writer threads.
Fields§
§decode: PhaseTimer§demosaic: PhaseTimer§normalize: PhaseTimer§wb_hl_ccm: PhaseTimer§oetf: PhaseTimer§pack: PhaseTimer§gpu: PhaseTimer§encode_push: PhaseTimer§setup: PhaseTimer§finalize: PhaseTimer§frames_total: AtomicU64§gpu_frames: AtomicU64§encode_push_per_frame: Mutex<Vec<(u32, Duration)>>C5: per-frame encode_push timing ring. Lets us post-mortem any
frame that took longer than the histogram resolution would
capture (e.g. the 776ms / 1.5s spikes that ffmpeg’s B-frame
lookahead produces on VBR). Writer is single-threaded, so the
Mutex is uncontended.
Implementations§
Source§impl PipelineStats
impl PipelineStats
pub fn new() -> Self
Sourcepub fn record_encode_push_frame(&self, frame_id: u32, d: Duration)
pub fn record_encode_push_frame(&self, frame_id: u32, d: Duration)
C5: record an encode_push duration tagged with the frame id.
Updates the histogram-style encode_push PhaseTimer (so the
existing summary line still has its avg/min/max/stddev) and
appends (frame_id, duration) to the per-frame ring.
Sourcepub fn report(&self) -> StatsReport
pub fn report(&self) -> StatsReport
Build a serializable report. Cheap to call (8 atomic loads).
Trait Implementations§
Source§impl Debug for PipelineStats
impl Debug for PipelineStats
Auto Trait Implementations§
impl !Freeze for PipelineStats
impl RefUnwindSafe for PipelineStats
impl Send for PipelineStats
impl Sync for PipelineStats
impl Unpin for PipelineStats
impl UnsafeUnpin for PipelineStats
impl UnwindSafe for PipelineStats
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more