aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/database.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethdb/database.go b/ethdb/database.go
index 047821c30..10dc018b0 100644
--- a/ethdb/database.go
+++ b/ethdb/database.go
@@ -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")