mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 11:56:39 +08:00
remove debug print
This commit is contained in:
parent
178ded7572
commit
e70b19cfad
1 changed files with 0 additions and 14 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue