We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just wanted to explore what GC stats were getting captured, so i added go metrics.CaptureDebugGCStats(metrics.DefaultRegistry, 10*time.Second)
go metrics.CaptureDebugGCStats(metrics.DefaultRegistry, 10*time.Second)
and It appears to panic because debugMetrics.ReadGCStats is a Timer interface that is never initialized.
debugMetrics.ReadGCStats
version from go.mod is github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
The text was updated successfully, but these errors were encountered:
I experienced the same issue and it appears that you need to register the stats prior to using the capture function.
Example:
package main import ( metrics "github.com/rcrowley/go-metrics" ) func main() { metrics.RegisterDebugGCStats(metrics.DefaultRegistry) metrics.RegisterRuntimeMemStats(metrics.DefaultRegistry) go metrics.CaptureDebugGCStats(metrics.DefaultRegistry, 10*time.Second) go metrics.CaptureRuntimeMemStats(metrics.DefaultRegistry, 10*time.Second) go metrics.Log(metrics.DefaultRegistry, 2*time.Second, log.New(os.Stderr, "metrics: ", log.Lmicroseconds)) for { select{ } } }
Sorry, something went wrong.
No branches or pull requests
Just wanted to explore what GC stats were getting captured, so i added
go metrics.CaptureDebugGCStats(metrics.DefaultRegistry, 10*time.Second)
and It appears to panic because
debugMetrics.ReadGCStats
is a Timer interface that is never initialized.version from go.mod is
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
The text was updated successfully, but these errors were encountered: