mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Register processor queue length as histogram (#6012)
* Register processor queue length as histogram * Merge branch 'unstable' of https://github.com/sigp/lighthouse into processor-queue-histogram
This commit is contained in:
@@ -283,6 +283,12 @@ pub fn stop_timer(timer: Option<HistogramTimer>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn observe_vec(vec: &Result<HistogramVec>, name: &[&str], value: f64) {
|
||||
if let Some(h) = get_histogram(vec, name) {
|
||||
h.observe(value)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn inc_counter(counter: &Result<IntCounter>) {
|
||||
if let Ok(counter) = counter {
|
||||
counter.inc();
|
||||
|
||||
Reference in New Issue
Block a user