Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

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

Merged
merged 3 commits into from
Feb 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,17 @@ public 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(
Expand Down