Beispiel #1
0
func newGCMetricaDataSource(pollInterval int) goMetricaDataSource {
	r := metrics.NewRegistry()

	metrics.RegisterDebugGCStats(r)
	go metrics.CaptureDebugGCStats(r, time.Duration(pollInterval)*time.Second)
	return goMetricaDataSource{r}
}
Beispiel #2
0
func newMemoryMetricaDataSource(pollInterval int) goMetricaDataSource {
	r := metrics.NewRegistry()

	metrics.RegisterRuntimeMemStats(r)
	metrics.CaptureRuntimeMemStatsOnce(r)
	go metrics.CaptureRuntimeMemStats(r, time.Duration(pollInterval)*time.Second)
	return goMetricaDataSource{r}
}