Skip to content

Commit

Permalink
Merge pull request ethereum#3156 from holiman/metrics-blocks
Browse files Browse the repository at this point in the history
core: Add block processing time metric collection
  • Loading branch information
obscuren authored Oct 18, 2016
2 parents e8d0538 + 00b8534 commit 5b262ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 5b262ff

Please sign in to comment.