Add sync network context cache size metrics (#6049)

* Add sync network context cache size metrics
This commit is contained in:
Lion - dapplion
2024-07-09 18:31:26 +02:00
committed by GitHub
parent d46ac6c3d3
commit bde0428ac1
3 changed files with 58 additions and 21 deletions

View File

@@ -570,6 +570,8 @@ impl<T: BeaconChainTypes> SyncManager<T> {
// unless there is a bug.
let mut prune_lookups_interval = tokio::time::interval(Duration::from_secs(15));
let mut register_metrics_interval = tokio::time::interval(Duration::from_secs(5));
// process any inbound messages
loop {
tokio::select! {
@@ -582,6 +584,9 @@ impl<T: BeaconChainTypes> SyncManager<T> {
_ = prune_lookups_interval.tick() => {
self.block_lookups.prune_lookups();
}
_ = register_metrics_interval.tick() => {
self.network.register_metrics();
}
}
}
}