global_metrics

Function global_metrics 

Source
pub fn global_metrics() -> &'static MetricsRegistry
Expand description

Process-wide global MetricsRegistry instance.

Use this in production code to record metrics without threading a registry through every call.

ยงExample

use stygian_graph::application::metrics::{global_metrics, MetricEvent};

global_metrics().record(MetricEvent::CacheAccess { hit: true });