mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-27 05:08:11 +08:00
NET-1778: scale test code changes (#3203)
* comment ACL call and add debug message
* add cache for network nodes
* fix load node to network cache issue
* add peerUpdate call 1 min limit
* add debug log for scale test
* release maps
* avoid default policy for node
* 1 min limit for peerUpdate trigger
* mq options
* Revert "mq options"
This reverts commit 10b93d0118
.
* set peerUpdate run in sequence
* update for emqx 5.8.2
* remove batch peer update
* change the sleep to 10 millisec to avoid timeout
* add compress and change encrypt for peerUpdate message
* add mem profiling and automaxprocs
* add failover ctx mutex
* ignore request to failover peer
* remove code without called
* remove debug logs
* update emqx to v5.8.2
* change broker keepalive
* add OLD_ACL_SUPPORT setting
* add host version check for message encrypt
* remove debug message
* remove peerUpdate call control
---------
Co-authored-by: abhishek9686 <abhi281342@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package logic
|
||||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
|
||||
"github.com/gravitl/netmaker/logger"
|
||||
@@ -22,3 +23,15 @@ func StopCPUProfiling(f *os.File) {
|
||||
pprof.StopCPUProfile()
|
||||
f.Close()
|
||||
}
|
||||
|
||||
func StartMemProfiling() {
|
||||
f, err := os.OpenFile("/root/data/mem.prof", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0755)
|
||||
if err != nil {
|
||||
logger.Log(0, "could not create Memory profile: ", err.Error())
|
||||
}
|
||||
defer f.Close()
|
||||
runtime.GC() // get up-to-date statistics
|
||||
if err = pprof.WriteHeapProfile(f); err != nil {
|
||||
logger.Log(0, "could not write memory profile: ", err.Error())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user