pub struct PatternConfig {
pub n_plus_one_detection: bool,
pub n_plus_one_threshold: usize,
pub burst_detection: bool,
pub burst_threshold: usize,
pub burst_window: Duration,
pub session_history_size: usize,
pub session_timeout: Duration,
pub max_sessions: usize,
}Expand description
Pattern detection configuration
Fields§
§n_plus_one_detection: boolEnable N+1 query detection
n_plus_one_threshold: usizeThreshold for N+1 detection (min repeated queries)
burst_detection: boolEnable burst detection
burst_threshold: usizeThreshold for burst detection (queries per window)
burst_window: DurationBurst detection window
session_history_size: usizeSession query history size
session_timeout: DurationSession timeout (cleanup inactive sessions)
max_sessions: usizeMaximum sessions to track
Implementations§
Source§impl PatternConfig
impl PatternConfig
pub fn with_n_plus_one_threshold(self, threshold: usize) -> Self
pub fn with_burst_threshold(self, threshold: usize) -> Self
pub fn disable_patterns(self) -> Self
Trait Implementations§
Source§impl Clone for PatternConfig
impl Clone for PatternConfig
Source§fn clone(&self) -> PatternConfig
fn clone(&self) -> PatternConfig
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 PatternConfig
impl Debug for PatternConfig
Auto Trait Implementations§
impl Freeze for PatternConfig
impl RefUnwindSafe for PatternConfig
impl Send for PatternConfig
impl Sync for PatternConfig
impl Unpin for PatternConfig
impl UnsafeUnpin for PatternConfig
impl UnwindSafe for PatternConfig
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