pub async fn handle_probe(
    name: &str,
    deadline: Instant,
    params: ParamIterator<'_>,
    metrics: &ProberMetrics,
    log: &Logger,
) -> ProbeResult {
    let timer = Timer::start();

    let probe = Probe::try_from(name)?;
    let result = probe.run(params, deadline, log).await;

    metrics
        .probe_duration
        .with_label_values(&[name, &result.status_code().0.to_string()])
        .observe(timer.elapsed());

    result
}
/// Executes the probe identified by the given name and returns the metrics it
/// produced; an error response on invalid parameters or internal error; or `404
/// Not Found` if a probe with the given name does not exist.
Executes the probe identified by the given name and returns the metrics it
produced; an error response on invalid parameters or internal error; or `404
Not Found` if a probe with the given name does not exist.
Executes the probe identified by the given name and returns the metrics it produced ; an error response on invalid parameters or internal error ; or ` 404 Not Found ` if a probe with the given name does not exist .
pub async fn handle_probe(
    name: &str,
    deadline: Instant,
    params: ParamIterator<'_>,
    metrics: &ProberMetrics,
    log: &Logger,
) -> ProbeResult {
    let timer = Timer::start();
    let probe = Probe::try_from(name)?;
    let result = probe.run(params, deadline, log).await;
    metrics
        .probe_duration
        .with_label_values(&[name, &result.status_code().0.to_string()])
        .observe(timer.elapsed());
    result
}
pub async fn handle_probe ( name : & str , deadline : Instant , params : ParamIterator < ' _ > , metrics : & ProberMetrics , log : & Logger , ) -> ProbeResult { let timer = Timer :: start ( ) ; let probe = Probe :: try_from ( name ) ? ; let result = probe . run ( params , deadline , log ) . await ; metrics . probe_duration . with_label_values ( & [ name , & result . status_code ( ) . 0 . to_string ( ) ] ) . observe ( timer . elapsed ( ) ) ; result }
Executes the probe identified by the given name and returns the metrics it
produced; an error response on invalid parameters or internal error; or `404
Not Found` if a probe with the given name does not exist.
Executes the probe identified by the given name and returns the metrics it produced ; an error response on invalid parameters or internal error ; or ` 404 Not Found ` if a probe with the given name does not exist .
name
&str
deadline
Instant
params
ParamIterator<'_>
metrics
&ProberMetrics
log
&Logger
name
&str
deadline
Instant
params
ParamIterator<'_>
metrics
&ProberMetrics
log
&Logger