From a7a50824a1d0c71165a4dc24f8d346114fe9a0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Mon, 11 May 2020 08:25:49 +0200 Subject: [PATCH] more metrics (#1004) --- beacon_chain/beacon_node.nim | 5 + beacon_chain/block_pool.nim | 6 + beacon_chain/spec/state_transition_epoch.nim | 9 +- scripts/launch_local_testnet.sh | 1 - ...con-chain-sim-node0-Grafana-dashboard.json | 1197 ++++++++++++++++- vendor/nim-metrics | 2 +- 6 files changed, 1145 insertions(+), 75 deletions(-) diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index b25de1426..873613136 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -51,6 +51,9 @@ declareCounter beacon_attestations_received, declareCounter beacon_blocks_received, "Number of beacon chain blocks received by this peer" +declareHistogram beacon_attestation_received_seconds_from_slot_start, + "Interval between slot start and attestation receival", buckets = [2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, Inf] + logScope: topics = "beacnde" proc onBeaconBlock*(node: BeaconNode, signedBlock: SignedBeaconBlock) {.gcsafe.} @@ -658,6 +661,8 @@ proc run*(node: BeaconNode) = # Avoid double-counting attestation-topic attestations on shared codepath # when they're reflected through beacon blocks beacon_attestations_received.inc() + beacon_attestation_received_seconds_from_slot_start.observe(node.beaconClock.now.int64 - (attestation.data.slot.int64 * SECONDS_PER_SLOT.int64)) + node.onAttestation(attestation) var attestationSubscriptions: seq[Future[void]] = @[] diff --git a/beacon_chain/block_pool.nim b/beacon_chain/block_pool.nim index 7b787748d..19a27f2c4 100644 --- a/beacon_chain/block_pool.nim +++ b/beacon_chain/block_pool.nim @@ -14,6 +14,8 @@ import spec/[crypto, datatypes, digest, helpers, validator] declareCounter beacon_reorgs_total, "Total occurrences of reorganizations of the chain" # On fork choice +declareCounter beacon_state_data_cache_hits, "pool.cachedStates hits" +declareCounter beacon_state_data_cache_misses, "pool.cachedStates misses" logScope: topics = "blkpool" @@ -729,6 +731,7 @@ proc rewindState(pool: BlockPool, state: var StateData, bs: BlockSlot): when false: doAssert state.blck == ancestor.refs + beacon_state_data_cache_hits.inc() trace "Replaying state transitions via in-memory cache", stateSlot = shortLog(state.data.data.slot), ancestorStateRoot = shortLog(ancestor.data.message.state_root), @@ -740,6 +743,7 @@ proc rewindState(pool: BlockPool, state: var StateData, bs: BlockSlot): return ancestors + beacon_state_data_cache_misses.inc() if (let tmp = pool.db.getStateRoot(parBs.blck.root, parBs.slot); tmp.isSome()): if pool.db.containsState(tmp.get): stateRoot = tmp @@ -795,12 +799,14 @@ proc getStateDataCached(pool: BlockPool, state: var StateData, bs: BlockSlot): b for poolStateCache in pool.cachedStates: try: state = poolStateCache[(a: bs.blck.root, b: bs.slot)] + beacon_state_data_cache_hits.inc() return true except KeyError: discard # In-memory caches didn't hit. Try main blockpool database. This is slower # than the caches due to SSZ (de)serializing and disk I/O, so prefer them. + beacon_state_data_cache_misses.inc() if (let tmp = pool.db.getStateRoot(bs.blck.root, bs.slot); tmp.isSome()): return pool.getState(pool.db, tmp.get(), bs.blck, state) diff --git a/beacon_chain/spec/state_transition_epoch.nim b/beacon_chain/spec/state_transition_epoch.nim index 6057adff7..437d39bd1 100644 --- a/beacon_chain/spec/state_transition_epoch.nim +++ b/beacon_chain/spec/state_transition_epoch.nim @@ -61,6 +61,7 @@ declareGauge epoch_transition_times_rewards_and_penalties, "Epoch transition rew declareGauge epoch_transition_registry_updates, "Epoch transition registry updates time" declareGauge epoch_transition_slashings, "Epoch transition slashings time" declareGauge epoch_transition_final_updates, "Epoch transition final updates time" +declareGauge beacon_current_epoch, "Current epoch" # Spec # -------------------------------------------------------- @@ -424,8 +425,9 @@ func process_final_updates*(state: var BeaconState) {.nbench.}= # https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/beacon-chain.md#epoch-processing proc process_epoch*(state: var BeaconState, updateFlags: UpdateFlags) {.nbench.} = + let currentEpoch = get_current_epoch(state) trace "process_epoch", - current_epoch = get_current_epoch(state) + current_epoch = currentEpoch var per_epoch_cache = get_empty_per_epoch_cache() @@ -433,11 +435,11 @@ proc process_epoch*(state: var BeaconState, updateFlags: UpdateFlags) process_justification_and_finalization(state, per_epoch_cache, updateFlags) # state.slot hasn't been incremented yet. - if verifyFinalization in updateFlags and get_current_epoch(state) >= 3: + if verifyFinalization in updateFlags and currentEpoch >= 3: # Rule 2/3/4 finalization results in the most pessimal case. The other # three finalization rules finalize more quickly as long as the any of # the finalization rules triggered. - doAssert state.finalized_checkpoint.epoch + 3 >= get_current_epoch(state) + doAssert state.finalized_checkpoint.epoch + 3 >= currentEpoch # https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/beacon-chain.md#rewards-and-penalties-1 process_rewards_and_penalties(state, per_epoch_cache) @@ -457,6 +459,7 @@ proc process_epoch*(state: var BeaconState, updateFlags: UpdateFlags) process_final_updates(state) # Once per epoch metrics + beacon_current_epoch.set(currentEpoch.int64) beacon_finalized_epoch.set(state.finalized_checkpoint.epoch.int64) beacon_finalized_root.set(state.finalized_checkpoint.root.toGaugeValue) beacon_current_justified_epoch.set( diff --git a/scripts/launch_local_testnet.sh b/scripts/launch_local_testnet.sh index 362e575b1..aacaba73f 100755 --- a/scripts/launch_local_testnet.sh +++ b/scripts/launch_local_testnet.sh @@ -128,7 +128,6 @@ fi NETWORK_NIM_FLAGS=$(scripts/load-testnet-nim-flags.sh ${NETWORK}) $MAKE LOG_LEVEL="${LOG_LEVEL}" NIMFLAGS="-d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS}" beacon_node -rm -rf "${DEPOSITS_DIR}" ./build/beacon_node makeDeposits \ --quickstart-deposits=${QUICKSTART_VALIDATORS} \ --random-deposits=${RANDOM_VALIDATORS} \ diff --git a/tests/simulation/beacon-chain-sim-node0-Grafana-dashboard.json b/tests/simulation/beacon-chain-sim-node0-Grafana-dashboard.json index 0d246edd8..bf0867a64 100644 --- a/tests/simulation/beacon-chain-sim-node0-Grafana-dashboard.json +++ b/tests/simulation/beacon-chain-sim-node0-Grafana-dashboard.json @@ -9,13 +9,42 @@ "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" + }, + { + "datasource": "Prometheus", + "enable": true, + "expr": "changes(beacon_current_epoch{node=\"0\"}[2s])", + "hide": false, + "iconColor": "#FFA6B0", + "limit": 100, + "name": "epoch", + "showIn": 0, + "step": "1s", + "tags": [], + "titleFormat": "epoch", + "type": "tags", + "useValueForTime": false + }, + { + "datasource": "Prometheus", + "enable": false, + "expr": "changes(beacon_slot{node=\"0\"}[2s])", + "hide": false, + "iconColor": "#FFF899", + "limit": 100, + "name": "slot", + "showIn": 0, + "step": "1s", + "tags": [], + "titleFormat": "slot", + "type": "tags" } ] }, "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 6, + "id": 13, "links": [], "panels": [ { @@ -27,11 +56,12 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 8, - "w": 24, + "h": 6, + "w": 14, "x": 0, "y": 0 }, + "hiddenSeries": false, "id": 2, "legend": { "avg": false, @@ -53,30 +83,10 @@ "points": false, "renderer": "flot", "seriesOverrides": [ - { - "alias": "process_resident_memory_bytes{instance=\"localhost:9093\",job=\"nimbus\"}", - "yaxis": 2 - }, - { - "alias": "process_virtual_memory_bytes{instance=\"localhost:9093\",job=\"nimbus\"}", - "yaxis": 2 - }, - { - "alias": "nim_gc_mem_bytes{instance=\"localhost:9093\",job=\"nimbus\"}", - "yaxis": 2 - }, - { - "alias": "nim_gc_mem_occupied_bytes{instance=\"localhost:9093\",job=\"nimbus\"}", - "yaxis": 2 - }, { "alias": "RSS", "yaxis": 2 }, - { - "alias": "virtual mem", - "yaxis": 2 - }, { "alias": "Nim GC mem total", "yaxis": 2 @@ -120,7 +130,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "beacon_node #0", + "title": "resources #0", "tooltip": { "shared": true, "sort": 0, @@ -140,7 +150,7 @@ "label": null, "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true }, { @@ -148,7 +158,7 @@ "label": null, "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true } ], @@ -166,18 +176,20 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 8 + "h": 5, + "w": 10, + "x": 14, + "y": 0 }, "hiddenSeries": false, "id": 16, "legend": { + "alignAsTable": false, "avg": false, "current": false, "max": false, "min": false, + "rightSide": false, "show": true, "total": false, "values": false @@ -258,18 +270,20 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 15 + "h": 5, + "w": 10, + "x": 14, + "y": 5 }, "hiddenSeries": false, - "id": 18, + "id": 20, "legend": { + "alignAsTable": false, "avg": false, "current": false, "max": false, "min": false, + "rightSide": false, "show": true, "total": false, "values": false @@ -288,6 +302,107 @@ "spaceLength": 10, "stack": false, "steppedLine": false, + "targets": [ + { + "expr": "beacon_current_validators{node=\"0\"}", + "interval": "", + "legendFormat": "current validators", + "refId": "A" + }, + { + "expr": "beacon_current_live_validators{node=\"0\"}", + "interval": "", + "legendFormat": "current live validators", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "validators #0", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 14, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*/", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { "expr": "nim_gc_heap_instance_occupied_bytes{node=\"0\"}", @@ -321,6 +436,95 @@ "logBase": 1, "max": null, "min": "0", + "show": false + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 10, + "x": 14, + "y": 10 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "beacon_state_data_cache_hits_total{node=\"0\"} * 100 / (beacon_state_data_cache_hits_total{node=\"0\"} + beacon_state_data_cache_misses_total{node=\"0\"})", + "interval": "", + "legendFormat": "cache hit rate", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "pool.cachedStates #0", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "percent", + "label": null, + "logBase": 1, + "max": "100", + "min": "0", "show": true }, { @@ -337,6 +541,99 @@ "alignLevel": null } }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 14, + "x": 0, + "y": 12 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "/.*/", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sqlite3_memory_used_bytes{node=\"0\"}", + "interval": "", + "legendFormat": "Memory used", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "SQLite3 #0", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + }, + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "cacheTimeout": null, "colorBackground": false, @@ -356,10 +653,10 @@ "thresholdMarkers": true }, "gridPos": { - "h": 3, + "h": 2, "w": 5, - "x": 0, - "y": 22 + "x": 14, + "y": 15 }, "id": 6, "interval": null, @@ -439,10 +736,10 @@ "thresholdMarkers": true }, "gridPos": { - "h": 3, + "h": 2, "w": 5, - "x": 5, - "y": 22 + "x": 19, + "y": 15 }, "id": 8, "interval": null, @@ -503,6 +800,91 @@ ], "valueName": "current" }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 14, + "y": 17 + }, + "id": 28, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.7.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "beacon_slot{node=\"0\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "current slot #0", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, { "cacheTimeout": null, "colorBackground": false, @@ -523,10 +905,526 @@ "thresholdMarkers": true }, "gridPos": { - "h": 3, + "h": 2, "w": 4, - "x": 10, - "y": 22 + "x": 17, + "y": 17 + }, + "id": 13, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(beacon_attestations_sent_total)", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "att'ns sent (all) #0", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 17 + }, + "id": 14, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "beacon_attestations_received_total{node=\"0\"}", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "att'ns recv'd #0", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": { + "proposed": "dark-yellow", + "received": "light-green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 14, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(beacon_blocks_received_total{node=\"0\"}[2s])", + "interval": "", + "legendFormat": "received", + "refId": "B" + }, + { + "expr": "rate(beacon_blocks_proposed_total{node=\"0\"}[2s])", + "interval": "", + "legendFormat": "proposed", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "blocks", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 14, + "y": 19 + }, + "id": 32, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "beacon_current_epoch{node=\"0\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "current epoch #0", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 17, + "y": 19 + }, + "id": 34, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "beacon_current_justified_epoch{node=\"0\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "last justified epoch #0", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "decimals": null, + "format": "s", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 19 + }, + "id": 40, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "time() - process_start_time_seconds{node=\"0\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "runtime #0", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorPrefix": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 14, + "y": 21 }, "id": 12, "interval": null, @@ -589,7 +1487,6 @@ { "cacheTimeout": null, "colorBackground": false, - "colorPrefix": false, "colorValue": false, "colors": [ "#299c46", @@ -606,12 +1503,12 @@ "thresholdMarkers": true }, "gridPos": { - "h": 3, + "h": 2, "w": 4, - "x": 14, - "y": 22 + "x": 17, + "y": 21 }, - "id": 13, + "id": 36, "interval": null, "links": [], "mappingType": 1, @@ -650,14 +1547,16 @@ "tableColumn": "", "targets": [ { - "expr": "sum(beacon_attestations_sent_total)", + "expr": "beacon_finalized_epoch{node=\"0\"}", + "interval": "", + "legendFormat": "", "refId": "A" } ], "thresholds": "", "timeFrom": null, "timeShift": null, - "title": "att'ns sent (all)", + "title": "last finalized epoch #0", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -672,7 +1571,6 @@ { "cacheTimeout": null, "colorBackground": false, - "colorPrefix": false, "colorValue": false, "colors": [ "#299c46", @@ -689,12 +1587,12 @@ "thresholdMarkers": true }, "gridPos": { - "h": 3, - "w": 4, - "x": 18, - "y": 22 + "h": 12, + "w": 10, + "x": 14, + "y": 23 }, - "id": 14, + "id": 42, "interval": null, "links": [], "mappingType": 1, @@ -731,37 +1629,193 @@ "ymin": null }, "tableColumn": "", - "targets": [ - { - "expr": "beacon_attestations_received_total{node=\"0\"}", - "refId": "A" - } - ], "thresholds": "", "timeFrom": null, "timeShift": null, - "title": "att'ns recv'd #0", + "title": "spacer #0", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", - "text": "N/A", + "text": "_", "value": "null" } ], "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 14, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 30, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(beacon_attestations_received_total{node=\"0\"}[2s])", + "interval": "", + "legendFormat": "received", + "refId": "A" + }, + { + "expr": "rate(beacon_attestations_sent_total{node=\"0\"}[2s])", + "interval": "", + "legendFormat": "sent", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "attestations #0", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "max": null, + "min": 0, + "mode": "opacity" + }, + "dataFormat": "tsbuckets", + "datasource": null, + "gridPos": { + "h": 6, + "w": 14, + "x": 0, + "y": 29 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 26, + "interval": "", + "legend": { + "show": false + }, + "reverseYBuckets": false, + "targets": [ + { + "expr": "rate(beacon_attestation_received_seconds_from_slot_start_bucket{node=\"0\"}[2s])", + "format": "heatmap", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "received attestation delay (s) #0", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "short", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null } ], "refresh": "5s", - "schemaVersion": 20, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { - "from": "now-15m", + "from": "now-1h", "to": "now" }, "timepicker": { @@ -779,7 +1833,10 @@ ] }, "timezone": "", - "title": "beacon chain sim", - "uid": "pgeNfj2Wz", - "version": 15 + "title": "beacon chain sim (node0)", + "uid": "pgeNfj2Wz2", + "variables": { + "list": [] + }, + "version": 28 } diff --git a/vendor/nim-metrics b/vendor/nim-metrics index b217f1d34..f91deb742 160000 --- a/vendor/nim-metrics +++ b/vendor/nim-metrics @@ -1 +1 @@ -Subproject commit b217f1d343dce8c642b24aa8fbb7887dcea0fd4a +Subproject commit f91deb74228ecb14fb82575e4d0f387ad9732b8a