mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: Make block download metric include inflight block range requests (#10826)
Co-authored-by: garwah <garwah@garwah>
This commit is contained in:
@ -163,8 +163,9 @@ where
|
|||||||
|
|
||||||
/// Sets the metrics for the active downloads
|
/// Sets the metrics for the active downloads
|
||||||
fn update_block_download_metrics(&self) {
|
fn update_block_download_metrics(&self) {
|
||||||
self.metrics.active_block_downloads.set(self.inflight_full_block_requests.len() as f64);
|
let blocks = self.inflight_full_block_requests.len() +
|
||||||
// TODO: full block range metrics
|
self.inflight_block_range_requests.iter().map(|r| r.count() as usize).sum::<usize>();
|
||||||
|
self.metrics.active_block_downloads.set(blocks as f64);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a pending event to the FIFO queue.
|
/// Adds a pending event to the FIFO queue.
|
||||||
|
|||||||
Reference in New Issue
Block a user