优化代码

This commit is contained in:
GoEdgeLab
2023-10-05 08:41:07 +08:00
parent 6aba7fb295
commit 7fb050fc80
2 changed files with 6 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ func StartMemoryStats(t *testing.T) {
for range ticker.C {
runtime.ReadMemStats(stat)
if stat.HeapInuse == lastHeapInUse {
return
continue
}
lastHeapInUse = stat.HeapInuse