From 216837b6f6f4fd4915e8e9071b420214b8eb59bc Mon Sep 17 00:00:00 2001 From: qydysky Date: Wed, 15 May 2024 16:00:40 +0000 Subject: [PATCH] =?utf8?q?Fix=20=20v0.13.9=E5=AD=98=E5=9C=A8=E5=BC=82?= =?utf8?q?=E5=B8=B8gc=20#117?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/F/genCpuPprof/genCpuPprof.go | 7 ++----- demo/config/config_K_v.json | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Reply/F/genCpuPprof/genCpuPprof.go b/Reply/F/genCpuPprof/genCpuPprof.go index bfcafa3..3a448ae 100644 --- a/Reply/F/genCpuPprof/genCpuPprof.go +++ b/Reply/F/genCpuPprof/genCpuPprof.go @@ -15,10 +15,7 @@ import ( var Start = comp.NewComp(start) -var ( - timer = time.NewTicker(time.Minute) - once sync.Once -) +var once sync.Once func start(ctx context.Context, file string) (any, error) { if file == "" { @@ -46,7 +43,7 @@ func start(ctx context.Context, file string) (any, error) { return } select { - case <-timer.C: + case <-time.After(time.Minute): pprof.StopCPUProfile() case <-ctx1.Done(): pprof.StopCPUProfile() diff --git a/demo/config/config_K_v.json b/demo/config/config_K_v.json index 9e307f8..7e16eff 100644 --- a/demo/config/config_K_v.json +++ b/demo/config/config_K_v.json @@ -189,7 +189,7 @@ "debug模式":false, "性能路径-help":"当Web服务地址不为空时, 访问此路径可以获取性能信息,为空时关闭", "性能路径":"/state", - "生成pgo-help":"将在退出后生成pgo文件在指定路径,default.pgo将有助于下次构建的优化,但也会导致构建缓慢,为空时不生成", + "生成pgo-help":"将在退出后生成pgo文件在指定路径,default.pgo将有助于下次构建的优化,但会导致gc频繁,构建缓慢,为空时不生成", "生成pgo":"", "登陆二维码-白":"OO", "登陆二维码-黑":" " -- 2.39.2