File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/main/scala/io/iohk/ethereum/ledger Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class BlockImport(
7373 )
7474
7575 if (importedBlocks.nonEmpty) {
76- importedBlocks.map (blockData => BlockMetrics .measure(blockData.block, blockchain.getBlockByHash))
76+ importedBlocks.foreach (blockData => BlockMetrics .measure(blockData.block, blockchain.getBlockByHash))
7777 }
7878
7979 result
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ case object BlockMetrics extends MetricsContainer {
99
1010 private [this ] final val BlockNumberGauge =
1111 metrics.registry.gauge(" sync.block.number.gauge" , new AtomicDouble (0d ))
12+ private [this ] final val CheckpointBlockNumberGauge =
13+ metrics.registry.gauge(" sync.block.checkpoint.number.gauge" , new AtomicDouble (0d ))
1214 private [this ] final val BlockGasLimitGauge =
1315 metrics.registry.gauge(" sync.block.gasLimit.gauge" , new AtomicDouble (0d ))
1416 private [this ] final val BlockGasUsedGauge =
@@ -24,6 +26,8 @@ case object BlockMetrics extends MetricsContainer {
2426
2527 def measure (block : Block , getBlockByHashFn : ByteString => Option [Block ]): Unit = {
2628 BlockNumberGauge .set(block.number.toDouble)
29+ if (block.hasCheckpoint)
30+ CheckpointBlockNumberGauge .set(block.number.toDouble)
2731 BlockGasLimitGauge .set(block.header.gasLimit.toDouble)
2832 BlockGasUsedGauge .set(block.header.gasUsed.toDouble)
2933 BlockDifficultyGauge .set(block.header.difficulty.toDouble)
You can’t perform that action at this time.
0 commit comments