aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2016-10-18 15:06:26 +0800
committerMartin Holst Swende <martin@swende.se>2016-10-18 15:29:50 +0800
commit00b853418edd650f516c4c4fa32df2a2a616b9d5 (patch)
treeae2d1ca441ca38546c97a3a518d4827c312044ee /core
parent6952fe3a5caf22ae76b7efb332b0d98ad02398de (diff)
downloadgo-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.tar
go-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.tar.gz
go-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.tar.bz2
go-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.tar.lz
go-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.tar.xz
go-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.tar.zst
go-tangerine-00b853418edd650f516c4c4fa32df2a2a616b9d5.zip
core: Add block processing time metric collection
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 7657fce78..f434b4fe9 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -949,6 +949,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
if glog.V(logger.Debug) {
glog.Infof("[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), block.GasUsed(), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart))
}
+ blockInsertTimer.UpdateSince(bstart)
events = append(events, ChainEvent{block, block.Hash(), logs})
// This puts transactions in a extra db for rpc
@@ -967,6 +968,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
if glog.V(logger.Detail) {
glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart))
}
+ blockInsertTimer.UpdateSince(bstart)
events = append(events, ChainSideEvent{block, logs})
case SplitStatTy: