pub struct SessionMetrics {
pub session_id: u64,
pub start_time_ms: i64,
pub encoding_rate: EncodingRate,
pub quality: QualityMetrics,
pub per_frame_metrics: VecDeque<FrameMetric>,
}Expand description
Full metrics for a single transcoding session.
Fields§
§session_id: u64Unique session identifier.
start_time_ms: i64Wall-clock start time (milliseconds since Unix epoch).
encoding_rate: EncodingRateCurrent encoding throughput.
quality: QualityMetricsCurrent quality measurements.
per_frame_metrics: VecDeque<FrameMetric>Ring buffer of the last 100 per-frame metrics.
Implementations§
Source§impl SessionMetrics
impl SessionMetrics
Sourcepub fn push_frame(&mut self, metric: FrameMetric)
pub fn push_frame(&mut self, metric: FrameMetric)
Pushes a frame metric onto the ring buffer; evicts oldest if full.
Sourcepub fn elapsed_secs(&self, current_time_ms: i64) -> f64
pub fn elapsed_secs(&self, current_time_ms: i64) -> f64
Returns the elapsed time since start_time_ms in seconds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionMetrics
impl RefUnwindSafe for SessionMetrics
impl Send for SessionMetrics
impl Sync for SessionMetrics
impl Unpin for SessionMetrics
impl UnsafeUnpin for SessionMetrics
impl UnwindSafe for SessionMetrics
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