Add metric to expose number of inflight world state requests. (#906)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Adrian Sutton 6 years ago committed by GitHub
parent 1e460157e8
commit 1c634dd885
  1. 10
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloader.java

@ -93,11 +93,17 @@ public class WorldStateDownloader {
this.maxOutstandingRequests = maxOutstandingRequests;
this.maxNodeRequestRetries = maxNodeRequestRetries;
this.ethTasksTimer = ethTasksTimer;
metricsSystem.createGauge(
metricsSystem.createLongGauge(
MetricCategory.SYNCHRONIZER,
"world_state_pending_requests_current",
"Number of pending requests for fast sync world state download",
() -> (double) pendingRequests.size());
pendingRequests::size);
metricsSystem.createIntegerGauge(
MetricCategory.SYNCHRONIZER,
"world_state_inflight_requests_current",
"Number of requests currently in flight for fast sync world state download",
outstandingRequests::size);
completedRequestsCounter =
metricsSystem.createCounter(

Loading…
Cancel
Save