增加若干内存缓存相关基准测试

This commit is contained in:
GoEdgeLab
2024-01-22 21:45:28 +08:00
parent fa2205bb26
commit d299ada28e
2 changed files with 149 additions and 0 deletions

View File

@@ -55,3 +55,9 @@ func StartMemoryStats(t *testing.T, callbacks ...func()) {
}
}()
}
func ReadMemoryStat() *runtime.MemStats {
var stat = &runtime.MemStats{}
runtime.ReadMemStats(stat)
return stat
}