Skip to main content

fmetric

Macro fmetric 

Source
macro_rules! fmetric {
    (target: $target:expr, $name:expr, $unit:expr, $($rest:tt)+) => { ... };
    ($name:expr, $unit:expr, $($rest:tt)+) => { ... };
}
Expand description

Records a float metric.

ยงExamples

use micromegas_tracing::fmetric;

fmetric!("Frame Time", "ticks", 1000.0);

Properties are key = value pairs between the unit and the value, as with imetric!:

use micromegas_tracing::prelude::*;

let elapsed_ms = 12.5;
fmetric!("fetch_ms", "ms", "http.method" = "GET", elapsed_ms);
fmetric!("delta", "ms", -elapsed_ms);