From dbaaac1a6ed95c5d6bedb89d82a8d1204ecfdbb2 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Fri, 17 Nov 2023 18:08:13 -0800 Subject: [PATCH] profile on 3GB --- src/corso.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corso.go b/src/corso.go index 96320814f..572b0d27b 100644 --- a/src/corso.go +++ b/src/corso.go @@ -34,9 +34,9 @@ func main() { var m runtime.MemStats runtime.ReadMemStats(&m) - // if mem > 5GB and we havent captured a profile this min, capture it + // if mem > 3GB and we havent captured a profile this min, capture it t := time.Now().Truncate(time.Minute) - if m.HeapAlloc > 5*1024*1024*1024 && perMinuteMap[t] == 0 { + if m.HeapAlloc > 3*1024*1024*1024 && perMinuteMap[t] == 0 { filename := "mem." + strconv.Itoa(profileCounter) + ".pprof" f, _ := os.Create(filename)