[][src]Struct holochain_tracing::ProbabilisticSampler

pub struct ProbabilisticSampler { /* fields omitted */ }

This samples a certain percentage of traces.


impl ProbabilisticSampler[src]

pub fn new(sampling_rate: f64) -> Result<ProbabilisticSampler, Error>[src]

Makes a new ProbabilisticSampler instance.


If sampling_rate is not in the range 0.0...1.0, it will return an error with the kind ErrorKind::InvalidInput.

Trait Implementations

impl Clone for ProbabilisticSampler[src]

impl Debug for ProbabilisticSampler[src]

impl<T> Sampler<T> for ProbabilisticSampler[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = !

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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