func NewGCMetricaDataSource(pollInterval int) GoMetricaDataSource { r := metrics.NewRegistry() metrics.RegisterDebugGCStats(r) go metrics.CaptureDebugGCStats(r, time.Duration(pollInterval)*time.Second) return GoMetricaDataSource{r} }
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} }