[][src]Struct isahc::Metrics

pub struct Metrics { /* fields omitted */ }

An object that holds status updates and progress statistics on a particular request. A Metrics can be shared between threads, which allows an agent thread to post updates to the object while consumers can read from the object simultaneously.

Reading stats is not always guaranteed to be up-to-date.

Implementations

impl Metrics[src]

pub fn upload_progress(&self) -> (u64, u64)[src]

Number of bytes uploaded / estimated total.

pub fn upload_speed(&self) -> f64[src]

Average upload speed so far in bytes/second.

pub fn download_progress(&self) -> (u64, u64)[src]

Number of bytes downloaded / estimated total.

pub fn download_speed(&self) -> f64[src]

Average download speed so far in bytes/second.

pub fn name_lookup_time(&self) -> Duration[src]

Get the total time from the start of the request until DNS name resolving was completed.

When a redirect is followed, the time from each request is added together.

pub fn connect_time(&self) -> Duration[src]

Get the amount of time taken to establish a connection to the server (not including TLS connection time).

When a redirect is followed, the time from each request is added together.

pub fn secure_connect_time(&self) -> Duration[src]

Get the amount of time spent on TLS handshakes.

When a redirect is followed, the time from each request is added together.

pub fn transfer_start_time(&self) -> Duration[src]

Get the time it took from the start of the request until the first byte is either sent or received.

When a redirect is followed, the time from each request is added together.

pub fn transfer_time(&self) -> Duration[src]

Get the amount of time spent performing the actual request transfer. The "transfer" includes both sending the request and receiving the response.

When a redirect is followed, the time from each request is added together.

pub fn total_time(&self) -> Duration[src]

Get the total time for the entire request. This will continuously increase until the entire response body is consumed and completed.

When a redirect is followed, the time from each request is added together.

pub fn redirect_time(&self) -> Duration[src]

If automatic redirect following is enabled, gets the total time taken for all redirection steps including name lookup, connect, pretransfer and transfer before final transaction was started.

Trait Implementations

impl Clone for Metrics[src]

impl Debug for Metrics[src]

Auto Trait Implementations

impl RefUnwindSafe for Metrics

impl Send for Metrics

impl Sync for Metrics

impl Unpin for Metrics

impl UnwindSafe for Metrics

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]