metrics: follow-up fixes to initialization

This commit is contained in:
Martin Holst Swende 2024-11-27 04:37:06 +01:00
parent 3ade355f6f
commit d803afd7b8
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
4 changed files with 3 additions and 4 deletions

View file

@ -33,7 +33,7 @@ import (
)
func TestMain(m *testing.M) {
metrics.Enabled = true
metrics.Init(true)
os.Exit(m.Run())
}

View file

@ -1,5 +1,5 @@
package metrics
func init() {
Enabled = true
metricsEnabled = true
}

View file

@ -6,7 +6,6 @@
package metrics
import (
"fmt"
"runtime/metrics"
"runtime/pprof"
"time"

View file

@ -27,7 +27,7 @@ import (
)
func TestMain(m *testing.M) {
metrics.Enabled = true
metrics.Init(true)
os.Exit(m.Run())
}