优化代码

This commit is contained in:
刘祥超
2024-03-28 17:18:00 +08:00
parent f1d0984031
commit 4cfd48f0c4
3 changed files with 70 additions and 18 deletions

View File

@@ -0,0 +1,17 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package memutils_test
import (
"github.com/TeaOSLab/EdgeNode/internal/utils/mem"
"testing"
)
func TestSystemMemoryGB(t *testing.T) {
t.Log(memutils.SystemMemoryGB())
t.Log(memutils.SystemMemoryGB())
t.Log(memutils.SystemMemoryGB())
t.Log(memutils.SystemMemoryBytes())
t.Log(memutils.SystemMemoryBytes())
t.Log(memutils.SystemMemoryBytes()>>30, "GB")
}