Comment out memstats worker. (#1239)

This commit is contained in:
Raja Subramanian
2022-12-19 22:37:34 +05:30
committed by GitHub
parent 120335da00
commit e6bbf07089
+3 -4
View File
@@ -2,7 +2,6 @@ package routing
import ( import (
"context" "context"
"runtime"
"sync" "sync"
"time" "time"
@@ -176,7 +175,7 @@ func (r *LocalRouter) Start() error {
return nil return nil
} }
go r.statsWorker() go r.statsWorker()
go r.memStatsWorker() // go r.memStatsWorker()
// on local routers, Start doesn't do anything, websocket connections initiate the connections // on local routers, Start doesn't do anything, websocket connections initiate the connections
go r.rtcMessageWorker() go r.rtcMessageWorker()
return nil return nil
@@ -207,6 +206,7 @@ func (r *LocalRouter) statsWorker() {
} }
} }
/*
func (r *LocalRouter) memStatsWorker() { func (r *LocalRouter) memStatsWorker() {
ticker := time.NewTicker(time.Second * 30) ticker := time.NewTicker(time.Second * 30)
defer ticker.Stop() defer ticker.Stop()
@@ -220,10 +220,9 @@ func (r *LocalRouter) memStatsWorker() {
"mallocs", m.Mallocs, "frees", m.Frees, "m-f", m.Mallocs-m.Frees, "mallocs", m.Mallocs, "frees", m.Frees, "m-f", m.Mallocs-m.Frees,
"hinuse", m.HeapInuse, "halloc", m.HeapAlloc, "frag", m.HeapInuse-m.HeapAlloc, "hinuse", m.HeapInuse, "halloc", m.HeapAlloc, "frag", m.HeapInuse-m.HeapAlloc,
) )
runtime.GC()
} }
} }
*/
func (r *LocalRouter) rtcMessageWorker() { func (r *LocalRouter) rtcMessageWorker() {
// is a new channel available? if so swap to that one // is a new channel available? if so swap to that one