diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index e3795f561..6a017b63f 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -19,6 +19,7 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/rlp" + "github.com/rcrowley/go-metrics" ) var ( @@ -27,6 +28,8 @@ var ( blockHashPre = []byte("block-hash-") blockNumPre = []byte("block-num-") + + blockInsertTimer = metrics.GetOrRegisterTimer("core/BlockInsertions", metrics.DefaultRegistry) ) const ( @@ -691,7 +694,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { self.futureBlocks.Delete(block.Hash()) stats.processed++ - + blockInsertTimer.UpdateSince(bstart) } if (stats.queued > 0 || stats.processed > 0 || stats.ignored > 0) && bool(glog.V(logger.Info)) { |