ckb_metrics::local

Trait CounterDelegator

Source
pub trait CounterDelegator<T, V>
where T: 'static + MayFlush, V: CounterWithValueType,
{ // Required methods fn get_root_metric(&self) -> &'static LocalKey<T>; fn get_local<'a>( &self, root_metric: &'a T, ) -> &'a GenericLocalCounter<<V as CounterWithValueType>::ValueType>; }
Expand description

Delegator for auto flush-able local counter

Required Methods§

Source

fn get_root_metric(&self) -> &'static LocalKey<T>

Get the root local metric for delegate

Source

fn get_local<'a>( &self, root_metric: &'a T, ) -> &'a GenericLocalCounter<<V as CounterWithValueType>::ValueType>

Get the final counter for delegate

Implementors§