pub struct QueryBatcherConfig {
pub max_batch_size: usize,
pub batch_window: Duration,
pub max_queries_per_second: u64,
pub enable_deduplication: bool,
pub dedup_window: Duration,
pub max_pending_queries: usize,
pub enable_adaptive_rate: bool,
pub target_success_rate: f64,
}Expand description
Configuration for query batching
Fields§
§max_batch_size: usizeMaximum batch size (queries per batch)
batch_window: DurationBatch window duration (wait time before sending batch)
max_queries_per_second: u64Maximum queries per second (rate limit)
enable_deduplication: boolEnable query deduplication
dedup_window: DurationDeduplication window (merge queries within this window)
max_pending_queries: usizeMaximum pending queries in queue
enable_adaptive_rate: boolEnable adaptive rate limiting
target_success_rate: f64Target success rate for adaptive limiting (0.0-1.0)
Implementations§
Source§impl QueryBatcherConfig
impl QueryBatcherConfig
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
Configuration for high-performance mode
Sourcepub fn validate(&self) -> Result<(), QueryBatcherError>
pub fn validate(&self) -> Result<(), QueryBatcherError>
Validate the configuration
Trait Implementations§
Source§impl Clone for QueryBatcherConfig
impl Clone for QueryBatcherConfig
Source§fn clone(&self) -> QueryBatcherConfig
fn clone(&self) -> QueryBatcherConfig
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 QueryBatcherConfig
impl Debug for QueryBatcherConfig
Auto Trait Implementations§
impl Freeze for QueryBatcherConfig
impl RefUnwindSafe for QueryBatcherConfig
impl Send for QueryBatcherConfig
impl Sync for QueryBatcherConfig
impl Unpin for QueryBatcherConfig
impl UnwindSafe for QueryBatcherConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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