pub struct HttpStats {
pub method: String,
pub path: String,
pub remote_addr: String,
pub status: u16,
pub content_length: usize,
pub processing: u32,
pub transfer: u32,
pub serde: u32,
pub total: u32,
pub tls_version: String,
pub tls_not_before: String,
pub tls_not_after: String,
}Expand description
单次 HTTP 请求的性能统计,各时间字段单位为毫秒。
Fields§
§method: StringHTTP 方法
path: String请求路径
remote_addr: String服务端远端地址
status: u16响应状态码
content_length: usize响应体字节数
processing: u32从发出请求到收到响应头的耗时(毫秒)
transfer: u32读取完整响应体的耗时(毫秒)
serde: u32JSON 反序列化耗时(毫秒)
total: u32请求全程总耗时(毫秒)
tls_version: StringTLS 版本
tls_not_before: StringTLS 证书有效期起始时间
tls_not_after: StringTLS 证书有效期截止时间
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpStats
impl RefUnwindSafe for HttpStats
impl Send for HttpStats
impl Sync for HttpStats
impl Unpin for HttpStats
impl UnsafeUnpin for HttpStats
impl UnwindSafe for HttpStats
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