pub fn start_timer(
        hist: HistogramVec,
        label_names: &'static [&'static str; LABEL_COUNT],
        label_values: [&'a str; LABEL_COUNT],
    ) -> HistogramVecTimer<'a, LABEL_COUNT> {
        #[cfg(debug_assertions)]
        let label_map = label_names
            .iter()
            .cloned()
            .zip(label_values.iter().cloned())
            .collect();

        let timer = Self {
            hist,
            label_names,
            label_values,
            start: Instant::now(),
        };

        // Ensure that the set of label names matches that used to create `hist`.
        // Unfortunately there is no way to ensure that their order is the same.
        #[cfg(debug_assertions)]
        timer.hist.with(&label_map);

        timer
    }
/// Starts a timer when the instance is created.
///
/// `label_names` must include all label names used in the definition of
/// `hist`, in the same order. `label_values` defines the initial set of
/// label values, to be updated incrementally.
Starts a timer when the instance is created.
`label_names` must include all label names used in the definition of
`hist`, in the same order. `label_values` defines the initial set of
label values, to be updated incrementally.
Starts a timer when the instance is created . ` label_names ` must include all label names used in the definition of ` hist ` in the same order . ` label_values ` defines the initial set of label values to be updated incrementally .
pub fn start_timer(
        hist: HistogramVec,
        label_names: &'static [&'static str; LABEL_COUNT],
        label_values: [&'a str; LABEL_COUNT],
    ) -> HistogramVecTimer<'a, LABEL_COUNT> {
        #[cfg(debug_assertions)]
        let label_map = label_names
            .iter()
            .cloned()
            .zip(label_values.iter().cloned())
            .collect();
        let timer = Self {
            hist,
            label_names,
            label_values,
            start: Instant::now(),
        };
        // Ensure that the set of label names matches that used to create `hist`.
        // Unfortunately there is no way to ensure that their order is the same.
        #[cfg(debug_assertions)]
        timer.hist.with(&label_map);
        timer
    }
pub fn start_timer ( hist : HistogramVec , label_names : & ' static [ & ' static str ; LABEL_COUNT ] , label_values : [ & ' a str ; LABEL_COUNT ] , ) -> HistogramVecTimer < ' a , LABEL_COUNT > { # [ cfg ( debug_assertions ) ] let label_map = label_names . iter ( ) . cloned ( ) . zip ( label_values . iter ( ) . cloned ( ) ) . collect ( ) ; let timer = Self { hist , label_names , label_values , start : Instant :: now ( ) , } ; // Ensure that the set of label names matches that used to create `hist`. // Unfortunately there is no way to ensure that their order is the same. # [ cfg ( debug_assertions ) ] timer . hist . with ( & label_map ) ; timer }
Starts a timer when the instance is created.
Starts a timer when the instance is created .
hist
HistogramVec
label_names
&'static [&'static str; LABEL_COUNT]
label_values
[&'a str; LABEL_COUNT]
hist
HistogramVec
label_names
&'static [&'static str; LABEL_COUNT]
label_values
[&'a str; LABEL_COUNT]