优化代码

This commit is contained in:
刘祥超
2024-03-28 17:17:34 +08:00
parent f119690ab7
commit f1d0984031
27 changed files with 52 additions and 63 deletions

View File

@@ -1,8 +1,8 @@
package ttlcache
import (
"github.com/TeaOSLab/EdgeNode/internal/utils"
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
memutils "github.com/TeaOSLab/EdgeNode/internal/utils/mem"
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
"github.com/iwind/TeaGo/assert"
"github.com/iwind/TeaGo/rands"
@@ -60,7 +60,7 @@ func TestCache_Memory(t *testing.T) {
})
var count = 1_000_000
if utils.SystemMemoryGB() > 4 {
if memutils.SystemMemoryGB() > 4 {
count = 20_000_000
}
for i := 0; i < count; i++ {