pub(super) struct SeqLenDistribution {
pub min: usize,
pub max: usize,
pub mean: usize,
pub p95: usize,
}Expand description
Per-batch token-length distribution statistics.
All lengths are measured in tokens (post-tokenization id counts), before
any padding. Carried in super::types::EmbedStats and logged on every
completed embed request so operators can correlate latency spikes with new
(batch_size, seq_len) shapes hitting TRT engine compile paths.
Fields§
§min: usizeMinimum token sequence length in the batch.
max: usizeMaximum token sequence length in the batch.
mean: usizeMean token sequence length (integer, truncated toward zero).
p95: usize95th-percentile token sequence length.
Index is (n * 95) / 100 on a sorted copy — a conservative floor
that never exceeds n - 1. For a batch of 64 texts this maps to
index 60, meaning the 61st-shortest sequence.
Trait Implementations§
Source§impl Clone for SeqLenDistribution
impl Clone for SeqLenDistribution
Source§fn clone(&self) -> SeqLenDistribution
fn clone(&self) -> SeqLenDistribution
Returns a duplicate of the value. Read more
1.0.0 · 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 SeqLenDistribution
impl Debug for SeqLenDistribution
Source§impl Default for SeqLenDistribution
impl Default for SeqLenDistribution
Source§fn default() -> SeqLenDistribution
fn default() -> SeqLenDistribution
Returns the “default value” for a type. Read more
impl Copy for SeqLenDistribution
Auto Trait Implementations§
impl Freeze for SeqLenDistribution
impl RefUnwindSafe for SeqLenDistribution
impl Send for SeqLenDistribution
impl Sync for SeqLenDistribution
impl Unpin for SeqLenDistribution
impl UnsafeUnpin for SeqLenDistribution
impl UnwindSafe for SeqLenDistribution
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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