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:
Lion - dapplion
2024-09-09 14:18:30 +02:00
committed by GitHub
parent 815567a91a
commit 51091a40fa
7 changed files with 319 additions and 423 deletions

View File

@@ -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();