This commit is contained in:
GoEdgeLab
2024-07-27 15:42:50 +08:00
parent d511145bc5
commit c19be78e0d
524 changed files with 1817 additions and 1346 deletions

View File

@@ -3,10 +3,11 @@
package memutils
import (
"time"
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"github.com/TeaOSLab/EdgeNode/internal/utils/goman"
"github.com/shirou/gopsutil/v3/mem"
"time"
)
var systemTotalMemory = -1

View File

@@ -1,4 +1,4 @@
// Copyright 2023 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
//go:build go1.19
package memutils

View File

@@ -1,4 +1,4 @@
// Copyright 2023 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
//go:build !go1.19
package memutils
@@ -6,4 +6,4 @@ package memutils
// 设置软内存最大值
func setMaxMemory(memoryGB int) {
}
}

View File

@@ -3,8 +3,9 @@
package memutils_test
import (
"github.com/TeaOSLab/EdgeNode/internal/utils/mem"
"testing"
"github.com/TeaOSLab/EdgeNode/internal/utils/mem"
)
func TestSystemMemoryGB(t *testing.T) {