pub struct ShadowComparison {
pub sql: String,
pub orm_duration: Duration,
pub raw_duration: Duration,
pub orm_rows: usize,
pub raw_rows: usize,
pub consistent: bool,
pub mismatch: Option<String>,
}Expand description
影子流量比较结果
Fields§
§sql: String执行的 SQL
orm_duration: DurationORM 路径执行耗时
raw_duration: Duration原生路径执行耗时
orm_rows: usizeORM 返回的行数
raw_rows: usize原生返回的行数
consistent: bool是否一致
mismatch: Option<String>不一致时的差异描述(首条差异)
Implementations§
Source§impl ShadowComparison
impl ShadowComparison
Sourcepub fn latency_ratio(&self) -> f64
pub fn latency_ratio(&self) -> f64
ORM 延迟与原生延迟的比值(>1 表示 ORM 更慢)
Trait Implementations§
Source§impl Clone for ShadowComparison
impl Clone for ShadowComparison
Source§fn clone(&self) -> ShadowComparison
fn clone(&self) -> ShadowComparison
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 ShadowComparison
impl RefUnwindSafe for ShadowComparison
impl Send for ShadowComparison
impl Sync for ShadowComparison
impl Unpin for ShadowComparison
impl UnsafeUnpin for ShadowComparison
impl UnwindSafe for ShadowComparison
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