mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
Merge pull request #2252 from karalabe/disable-metrics-metaops
ethdb: fully disable metrics if not requested (oops?)
This commit is contained in:
commit
1e62cd6c79
@ -168,6 +168,10 @@ func (self *LDBDatabase) LDB() *leveldb.DB {
|
||||
|
||||
// Meter configures the database metrics collectors and
|
||||
func (self *LDBDatabase) Meter(prefix string) {
|
||||
// Short circuit metering if the metrics system is disabled
|
||||
if !metrics.Enabled {
|
||||
return
|
||||
}
|
||||
// Initialize all the metrics collector at the requested prefix
|
||||
self.getTimer = metrics.NewTimer(prefix + "user/gets")
|
||||
self.putTimer = metrics.NewTimer(prefix + "user/puts")
|
||||
|
Loading…
Reference in New Issue
Block a user