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.maxOutstandingRequests = maxOutstandingRequests;
this.maxNodeRequestRetries = maxNodeRequestRetries; this.maxNodeRequestRetries = maxNodeRequestRetries;
this.ethTasksTimer = ethTasksTimer; this.ethTasksTimer = ethTasksTimer;
metricsSystem.createGauge( metricsSystem.createLongGauge(
MetricCategory.SYNCHRONIZER, MetricCategory.SYNCHRONIZER,
"world_state_pending_requests_current", "world_state_pending_requests_current",
"Number of pending requests for fast sync world state download", "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 = completedRequestsCounter =
metricsSystem.createCounter( metricsSystem.createCounter(

Loading…
Cancel
Save