mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Add metrics to track beacon processor queue times (#7808)
This PR adds a created_timestamp to the beacon processor send channel. When work items are sent through that channel `try_send` will forward the work event along with the current timestamp to the beacon processor. When the work event is completed the `Drop` impl for `SendOnDrop` will track the time it took from work event creation to its completion. Previously we only had data on how long a work event took to process, but didn't have data on how long it sat in the queue + how long it took to process.
This commit is contained in:
@@ -128,3 +128,10 @@ pub static BEACON_PROCESSOR_SEND_ERROR_PER_WORK_TYPE: LazyLock<Result<IntCounter
|
||||
&["type"],
|
||||
)
|
||||
});
|
||||
pub static BEACON_PROCESSOR_QUEUE_TIME: LazyLock<Result<HistogramVec>> = LazyLock::new(|| {
|
||||
try_create_histogram_vec(
|
||||
"beacon_processor_queue_time",
|
||||
"The delay between when a work event was queued in the beacon processor and when it was popped from the queue",
|
||||
&["work_type"]
|
||||
)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user