pub struct PoolTuningAdvice {
pub suggested_max_size: Option<u32>,
pub suggested_min_idle: Option<u32>,
pub suggested_idle_timeout: Option<Duration>,
pub reason: String,
}Expand description
连接池调优建议(启发式分析 PoolMetrics 后生成)
由 Pool::suggest_tuning() 返回。所有 Option 字段为 None 表示该项无需调整。
Fields§
§suggested_max_size: Option<u32>建议的最大连接数
suggested_min_idle: Option<u32>建议的最小空闲连接数
suggested_idle_timeout: Option<Duration>建议的空闲连接超时
reason: String调优原因说明
Implementations§
Source§impl PoolTuningAdvice
impl PoolTuningAdvice
Sourcepub fn is_optimal(&self) -> bool
pub fn is_optimal(&self) -> bool
判断池配置是否已最优(所有建议均为 None)
Trait Implementations§
Source§impl Clone for PoolTuningAdvice
impl Clone for PoolTuningAdvice
Source§fn clone(&self) -> PoolTuningAdvice
fn clone(&self) -> PoolTuningAdvice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PoolTuningAdvice
impl RefUnwindSafe for PoolTuningAdvice
impl Send for PoolTuningAdvice
impl Sync for PoolTuningAdvice
impl Unpin for PoolTuningAdvice
impl UnsafeUnpin for PoolTuningAdvice
impl UnwindSafe for PoolTuningAdvice
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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