aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2018-09-17 20:32:34 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-09-17 20:32:34 +0800
commit5d1d1a808d92440a7c0efad77fa5527e4255e596 (patch)
tree5c083f2bf130abe21f37f024018b91912446c70c /ethdb
parent41ac8dd803b646b5fa92354a983ee5df68253e2a (diff)
downloadgo-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.tar
go-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.tar.gz
go-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.tar.bz2
go-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.tar.lz
go-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.tar.xz
go-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.tar.zst
go-tangerine-5d1d1a808d92440a7c0efad77fa5527e4255e596.zip
consensus, ethdb, metrics: implement forced-meter (#17667)
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/database.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/ethdb/database.go b/ethdb/database.go
index 1b262b73c..99abd09b9 100644
--- a/ethdb/database.go
+++ b/ethdb/database.go
@@ -155,15 +155,12 @@ func (db *LDBDatabase) LDB() *leveldb.DB {
// Meter configures the database metrics collectors and
func (db *LDBDatabase) Meter(prefix string) {
- if metrics.Enabled {
- // Initialize all the metrics collector at the requested prefix
- db.compTimeMeter = metrics.NewRegisteredMeter(prefix+"compact/time", nil)
- db.compReadMeter = metrics.NewRegisteredMeter(prefix+"compact/input", nil)
- db.compWriteMeter = metrics.NewRegisteredMeter(prefix+"compact/output", nil)
- db.diskReadMeter = metrics.NewRegisteredMeter(prefix+"disk/read", nil)
- db.diskWriteMeter = metrics.NewRegisteredMeter(prefix+"disk/write", nil)
- }
- // Initialize write delay metrics no matter we are in metric mode or not.
+ // Initialize all the metrics collector at the requested prefix
+ db.compTimeMeter = metrics.NewRegisteredMeter(prefix+"compact/time", nil)
+ db.compReadMeter = metrics.NewRegisteredMeter(prefix+"compact/input", nil)
+ db.compWriteMeter = metrics.NewRegisteredMeter(prefix+"compact/output", nil)
+ db.diskReadMeter = metrics.NewRegisteredMeter(prefix+"disk/read", nil)
+ db.diskWriteMeter = metrics.NewRegisteredMeter(prefix+"disk/write", nil)
db.writeDelayMeter = metrics.NewRegisteredMeter(prefix+"compact/writedelay/duration", nil)
db.writeDelayNMeter = metrics.NewRegisteredMeter(prefix+"compact/writedelay/counter", nil)