diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-22 03:10:24 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-06-24 23:34:04 +0800 |
commit | 7f92e708c504e1c4a7382c68b5a4ed68db9c8deb (patch) | |
tree | 1b951d5231eb295e39766ab6a833e15ddbb8f926 /core | |
parent | b426301467304a6c047df9baa033a042ddf3c4bb (diff) | |
download | dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.tar dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.tar.gz dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.tar.bz2 dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.tar.lz dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.tar.xz dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.tar.zst dexon-7f92e708c504e1c4a7382c68b5a4ed68db9c8deb.zip |
cmd/geth, core: impl. percentile reporting, instrument insertions
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)) { |