diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-10-18 19:26:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-18 19:26:31 +0800 |
commit | 5b262ff5aba5309d16f02343b2a41c9afcd459ea (patch) | |
tree | 5d918ce1c676d07a6182f3f3fb50bfdd0f3e3c2e /core/blockchain.go | |
parent | e8d0538a0013664021d52d289688f6c7d7bf31ff (diff) | |
parent | 00b853418edd650f516c4c4fa32df2a2a616b9d5 (diff) | |
download | go-tangerine-5b262ff5aba5309d16f02343b2a41c9afcd459ea.tar.gz go-tangerine-5b262ff5aba5309d16f02343b2a41c9afcd459ea.tar.zst go-tangerine-5b262ff5aba5309d16f02343b2a41c9afcd459ea.zip |
Merge pull request #3156 from holiman/metrics-blocks
core: Add block processing time metric collection
Diffstat (limited to 'core/blockchain.go')
-rw-r--r-- | core/blockchain.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 07a9e91f4..5cf99cd8c 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -953,6 +953,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { if glog.V(logger.Debug) { glog.Infof("inserted block #%d [%x…] in %9v: %3d txs %7v gas %d uncles.", block.Number(), block.Hash().Bytes()[0:4], common.PrettyDuration(time.Since(bstart)), len(block.Transactions()), block.GasUsed(), len(block.Uncles())) } + blockInsertTimer.UpdateSince(bstart) events = append(events, ChainEvent{block, block.Hash(), logs}) // This puts transactions in a extra db for rpc @@ -971,6 +972,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { if glog.V(logger.Detail) { glog.Infof("inserted forked block #%d [%x…] (TD=%v) in %9v: %3d txs %d uncles.", block.Number(), block.Hash().Bytes()[0:4], block.Difficulty(), common.PrettyDuration(time.Since(bstart)), len(block.Transactions()), len(block.Uncles())) } + blockInsertTimer.UpdateSince(bstart) events = append(events, ChainSideEvent{block, logs}) case SplitStatTy: |