From e70b19cfad73bba152084c56c0f05f682821ed89 Mon Sep 17 00:00:00 2001 From: Abhishek Kondur Date: Mon, 13 Mar 2023 14:27:58 +0400 Subject: [PATCH] remove debug print --- metrics/metrics.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/metrics/metrics.go b/metrics/metrics.go index 0e997490..27913ad9 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -1,18 +1,12 @@ package metrics import ( - "encoding/json" - "os" "sync" "time" "github.com/gravitl/netmaker/models" ) -func Init() { - go dumpMetrics() -} - // lock for metrics map var metricsMapLock = &sync.RWMutex{} @@ -87,11 +81,3 @@ func ResetMetricForNode(server, peerKey, peerID string) { // MetricCollectionInterval - collection interval for metrics const MetricCollectionInterval = time.Second * 25 - -func dumpMetrics() { - for { - time.Sleep(time.Second * 35) - d, _ := json.MarshalIndent(metricsPeerMap, "", " ") - os.WriteFile("/tmp/metrics.json", d, 0755) - } -}