diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-23 18:03:33 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-06-24 23:34:04 +0800 |
commit | 792b0ddccdf135a8d9c33298bcb20d7bafb79a0b (patch) | |
tree | 0254dbf9674fb0750a1607968ace4a11019aa721 /core | |
parent | 6260b86c153abfd1d4c96fa558ed20e80c6c0e4b (diff) | |
download | dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.tar dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.tar.gz dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.tar.bz2 dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.tar.lz dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.tar.xz dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.tar.zst dexon-792b0ddccdf135a8d9c33298bcb20d7bafb79a0b.zip |
core, eth, eth/fetcher, ethdb: polish metrics gathering a bit
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index b87f65893..3b9b7517b 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -13,7 +13,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" @@ -31,10 +30,6 @@ var ( blockNumPre = []byte("block-num-") blockInsertTimer = metrics.GetOrRegisterTimer("core/BlockInsertions", metrics.DefaultRegistry) - blockdbGetMeter = metrics.GetOrRegisterMeter("core/blockdb/Gets", metrics.DefaultRegistry) - blockdbPutMeter = metrics.GetOrRegisterMeter("core/blockdb/Puts", metrics.DefaultRegistry) - statedbGetMeter = metrics.GetOrRegisterMeter("core/statedb/Gets", metrics.DefaultRegistry) - statedbPutMeter = metrics.GetOrRegisterMeter("core/statedb/Puts", metrics.DefaultRegistry) ) const ( @@ -126,15 +121,6 @@ func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow cache: NewBlockCache(blockCacheLimit), pow: pow, } - // Instrument the block and state databases - if db, ok := blockDb.(*ethdb.LDBDatabase); ok { - db.GetMeter = blockdbGetMeter - db.PutMeter = blockdbPutMeter - } - if db, ok := stateDb.(*ethdb.LDBDatabase); ok { - db.GetMeter = statedbGetMeter - db.PutMeter = statedbPutMeter - } // Check the genesis block given to the chain manager. If the genesis block mismatches block number 0 // throw an error. If no block or the same block's found continue. if g := bc.GetBlockByNumber(0); g != nil && g.Hash() != genesis.Hash() { |