[][src]Struct hotmic::Configuration

pub struct Configuration<T> { /* fields omitted */ }

A configuration builder for Receiver.

Methods

impl<T: Send + Eq + Hash + Display + Clone> Configuration<T>
[src]

pub fn new() -> Configuration<T>
[src]

Creates a new Configuration with default values.

pub fn capacity(self, capacity: usize) -> Self
[src]

Sets the buffer capacity.

Defaults to 4096.

This controls the size of the channel used to send metrics. This channel is shared amongst all active sinks. If this channel is full when sending a metric, that send will be blocked until the channel has free space.

Tweaking this value allows for a trade-off between low memory consumption and throughput burst capabilities. By default, we expect samples to occupy approximately 64 bytes. Thus, at our default value, we preallocate roughly ~232kB.

Generally speaking, sending and processing metrics is fast enough that the default value of 4096 supports millions of samples per second.

pub fn build(self) -> Receiver<T>
[src]

Create a Receiver based on this configuration.

Trait Implementations

impl<T> Default for Configuration<T>
[src]

impl<T: Clone> Clone for Configuration<T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Configuration<T> where
    T: Send

impl<T> Sync for Configuration<T> where
    T: Sync

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Erased for T