mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 22:38:34 +00:00
Add sync request metrics (#7790)
Add error rates metrics on unstable to benchmark against tree-sync. In my branch there are frequent errors but mostly connections errors as the node is still finding it set of stable peers. These metrics are very useful and unstable can benefit from them ahead of tree-sync Add three new metrics: - sync_rpc_requests_success_total: Total count of sync RPC requests successes - sync_rpc_requests_error_total: Total count of sync RPC requests errors - sync_rpc_request_duration_sec: Time to complete a successful sync RPC requesst Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
@@ -507,6 +507,30 @@ pub static SYNC_UNKNOWN_NETWORK_REQUESTS: LazyLock<Result<IntCounterVec>> = Lazy
|
||||
&["type"],
|
||||
)
|
||||
});
|
||||
pub static SYNC_RPC_REQUEST_SUCCESSES: LazyLock<Result<IntCounterVec>> = LazyLock::new(|| {
|
||||
try_create_int_counter_vec(
|
||||
"sync_rpc_requests_success_total",
|
||||
"Total count of sync RPC requests successes",
|
||||
&["protocol"],
|
||||
)
|
||||
});
|
||||
pub static SYNC_RPC_REQUEST_ERRORS: LazyLock<Result<IntCounterVec>> = LazyLock::new(|| {
|
||||
try_create_int_counter_vec(
|
||||
"sync_rpc_requests_error_total",
|
||||
"Total count of sync RPC requests errors",
|
||||
&["protocol", "error"],
|
||||
)
|
||||
});
|
||||
pub static SYNC_RPC_REQUEST_TIME: LazyLock<Result<HistogramVec>> = LazyLock::new(|| {
|
||||
try_create_histogram_vec_with_buckets(
|
||||
"sync_rpc_request_duration_sec",
|
||||
"Time to complete a successful sync RPC requesst",
|
||||
Ok(vec![
|
||||
0.001, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 1.0, 2.0,
|
||||
]),
|
||||
&["protocol"],
|
||||
)
|
||||
});
|
||||
|
||||
/*
|
||||
* Block Delay Metrics
|
||||
|
||||
Reference in New Issue
Block a user