pub struct BatchConfig {
pub max_batch_size: usize,
pub max_wait_ms: u64,
pub min_batch_size: usize,
pub enable_priority: bool,
pub max_seq_len: usize,
}Expand description
Configuration for continuous batching
Fields§
§max_batch_size: usizeMaximum batch size
max_wait_ms: u64Maximum waiting time before forming a batch (milliseconds)
min_batch_size: usizeMinimum batch size before processing (0 = process immediately)
enable_priority: boolEnable priority-based scheduling
max_seq_len: usizeMaximum sequence length
Implementations§
Source§impl BatchConfig
impl BatchConfig
Sourcepub fn max_batch_size(self, size: usize) -> Self
pub fn max_batch_size(self, size: usize) -> Self
Set maximum batch size
Sourcepub fn max_wait_ms(self, ms: u64) -> Self
pub fn max_wait_ms(self, ms: u64) -> Self
Set maximum wait time
Sourcepub fn min_batch_size(self, size: usize) -> Self
pub fn min_batch_size(self, size: usize) -> Self
Set minimum batch size
Sourcepub fn with_priority(self) -> Self
pub fn with_priority(self) -> Self
Enable priority scheduling
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
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 BatchConfig
impl Debug for BatchConfig
Source§impl Default for BatchConfig
impl Default for BatchConfig
Source§impl<'de> Deserialize<'de> for BatchConfig
impl<'de> Deserialize<'de> for BatchConfig
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
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnwindSafe for BatchConfig
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,
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