Struct metrics_printer::PrintRecorder [−][src]
A metrics recorder that collects metrics and regularly tried to print them.
Implementations
impl<P> PrintRecorder<P> where
P: Printer + Send + Sync + 'static,
[src]
P: Printer + Send + Sync + 'static,
pub fn new(printer: P) -> Self
[src]
New PrinterRecorder with 1s interval no metadata printing.
pub fn set_print_interval(&mut self, interval: Duration) -> &mut Self
[src]
Set how often metrics should be printed (roughly)
pub fn do_print_medata(&mut self) -> &mut Self
[src]
Print units and descriptions together with the metrics
pub fn skip_print_medata(&mut self) -> &mut Self
[src]
Do not print units and descriptions together with the metrics
pub fn select_quantiles(&mut self, quantiles: Box<[Quantile]>) -> &mut Self
[src]
Select which quantiles should be printed
pub fn install_if_free(self)
[src]
Register this recorder as the global recorder, if no other recorder is already registered.
If another recorder is registered, this will fail silently. This method is recommended to be used when you are trying to set the exact same recorder from multiple places and don’t know/care which will get executed first. This is often the case for unit tests, for example.
Also starts the background thread for printing.
pub fn install(self) -> Result<(), SetRecorderError>
[src]
Register this recorder as the global recorder, if no other recorder is already registered.
If another recorder is registered, this will return an error.
Also starts the background thread for printing.
Trait Implementations
impl Default for PrintRecorder<StdoutPrinter>
[src]
Auto Trait Implementations
impl<P> !RefUnwindSafe for PrintRecorder<P>
impl<P> Send for PrintRecorder<P>
impl<P> Sync for PrintRecorder<P>
impl<P> Unpin for PrintRecorder<P> where
P: Unpin,
P: Unpin,
impl<P> !UnwindSafe for PrintRecorder<P>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,