pub struct DelayBreakdown {
pub queue_wait: f64,
pub connection_setup: f64,
pub connection_time: f64,
pub transmission_time: f64,
}Expand description
延迟时间细分 - 与其他投递代理保持一致的格式
Fields§
§queue_wait: f64等待在队列中的时间
connection_setup: f64连接建立前的延迟(DISCARD中通常为0)
connection_time: f64建立连接的时间(DISCARD中通常为0)
transmission_time: f64数据传输时间(DISCARD中通常为0)
Implementations§
Source§impl DelayBreakdown
impl DelayBreakdown
Sourcepub fn from_delays_string(delays_str: &str) -> Option<Self>
pub fn from_delays_string(delays_str: &str) -> Option<Self>
从Postfix的delays字符串解析 (格式: “queue/conn_setup/conn/transmission”)
Sourcepub fn total_delay(&self) -> f64
pub fn total_delay(&self) -> f64
计算总延迟时间
Sourcepub fn is_fast_discard(&self) -> bool
pub fn is_fast_discard(&self) -> bool
判断是否为快速丢弃(总延迟<0.1秒)
Trait Implementations§
Source§impl Clone for DelayBreakdown
impl Clone for DelayBreakdown
Source§fn clone(&self) -> DelayBreakdown
fn clone(&self) -> DelayBreakdown
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 DelayBreakdown
impl Debug for DelayBreakdown
Source§impl<'de> Deserialize<'de> for DelayBreakdown
impl<'de> Deserialize<'de> for DelayBreakdown
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 DelayBreakdown
impl RefUnwindSafe for DelayBreakdown
impl Send for DelayBreakdown
impl Sync for DelayBreakdown
impl Unpin for DelayBreakdown
impl UnwindSafe for DelayBreakdown
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> 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