ResponseTimeHistogram

Struct ResponseTimeHistogram 

Source
pub struct ResponseTimeHistogram {
Show 13 fields pub bucket_1ms: AtomicU64, pub bucket_5ms: AtomicU64, pub bucket_10ms: AtomicU64, pub bucket_25ms: AtomicU64, pub bucket_50ms: AtomicU64, pub bucket_100ms: AtomicU64, pub bucket_250ms: AtomicU64, pub bucket_500ms: AtomicU64, pub bucket_1s: AtomicU64, pub bucket_2_5s: AtomicU64, pub bucket_5s: AtomicU64, pub bucket_10s: AtomicU64, pub bucket_inf: AtomicU64,
}
Expand description

High-performance histogram for response time distribution

Fields§

§bucket_1ms: AtomicU64

Requests completed in under 1 millisecond

§bucket_5ms: AtomicU64

Requests completed in 1-5 milliseconds

§bucket_10ms: AtomicU64

Requests completed in 5-10 milliseconds

§bucket_25ms: AtomicU64

Requests completed in 10-25 milliseconds

§bucket_50ms: AtomicU64

Requests completed in 25-50 milliseconds

§bucket_100ms: AtomicU64

Requests completed in 50-100 milliseconds

§bucket_250ms: AtomicU64

Requests completed in 100-250 milliseconds

§bucket_500ms: AtomicU64

Requests completed in 250-500 milliseconds

§bucket_1s: AtomicU64

Requests completed in 500ms-1 second

§bucket_2_5s: AtomicU64

Requests completed in 1-2.5 seconds

§bucket_5s: AtomicU64

Requests completed in 2.5-5 seconds

§bucket_10s: AtomicU64

Requests completed in 5-10 seconds

§bucket_inf: AtomicU64

Requests completed in over 10 seconds

Implementations§

Source§

impl ResponseTimeHistogram

Source

pub fn new() -> Self

Production-grade histogram creation with proper bucket initialization

Source

pub fn record(&self, duration_us: u64)

Record response time with proper bucket assignment

Trait Implementations§

Source§

impl Debug for ResponseTimeHistogram

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ResponseTimeHistogram

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,