metrics, internal/debug: Add --pprofaddr flag, expose metrics via gexp

This commit is contained in:
Nick Johnson
2016-10-14 08:22:31 +01:00
parent c780901cd5
commit 9e9bfc4e26
2 changed files with 9 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import (
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/rcrowley/go-metrics"
"github.com/rcrowley/go-metrics/exp"
)
// MetricsEnabledFlag is the CLI flag name to use to enable metrics collections.
@ -44,6 +45,7 @@ func init() {
Enabled = true
}
}
exp.Exp(metrics.DefaultRegistry)
}
// NewMeter create a new metrics Meter, either a real one of a NOP stub depending