/// Measures the timing of a download-related future and reports metrics as a histogram.
///
/// This function reports a single metric corresponding to the task name. This metric is reported
/// regardless of the future's return value.
///
/// A tag with the source name is also added to the metric, in addition to a tag recording the
/// status of the future.
Measures the timing of a download-related future and reports metrics as a histogram.
This function reports a single metric corresponding to the task name. This metric is reported
regardless of the future's return value.

A tag with the source name is also added to the metric, in addition to a tag recording the
status of the future.
Measures the timing of a download - related future and reports metrics as a histogram . This function reports a single metric corresponding to the task name . This metric is reported regardless of the future ' s return value . A tag with the source name is also added to the metric in addition to a tag recording the status of the future .
fn measure_download_time<'a, F, T, E>(
    source_name: &'a str,
    f: F,
) -> impl Future<Output = F::Output> + 'a
where
    F: 'a + Future<Output = Result<T, E>>,
{
    let guard = MeasureSourceDownloadGuard::new("source.download.connect", source_name);
    async move {
        let output = f.await;
        guard.done(&output);
        output
    }
}
fn measure_download_time < ' a , F , T , E > ( source_name : & ' a str , f : F , ) -> impl Future < Output = F :: Output > + ' a where F : ' a + Future < Output = Result < T , E > > , { let guard = MeasureSourceDownloadGuard :: new ( " " , source_name ) ; async move { let output = f . await ; guard . done ( & output ) ; output } }
Measures the timing of a download-related future and reports metrics as a histogram.
Measures the timing of a download - related future and reports metrics as a histogram .
source_name
&'a str
f
F