github.com/TeaOSLab/EdgeNode@v1.3.8/internal/utils/mem/system_test.go (about)

     1  // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
     2  
     3  package memutils_test
     4  
     5  import (
     6  	"github.com/TeaOSLab/EdgeNode/internal/utils/mem"
     7  	"testing"
     8  )
     9  
    10  func TestSystemMemoryGB(t *testing.T) {
    11  	t.Log(memutils.SystemMemoryGB())
    12  	t.Log(memutils.SystemMemoryGB())
    13  	t.Log(memutils.SystemMemoryGB())
    14  	t.Log(memutils.SystemMemoryBytes())
    15  	t.Log(memutils.SystemMemoryBytes())
    16  	t.Log(memutils.SystemMemoryBytes()>>30, "GB")
    17  	t.Log("available:", memutils.AvailableMemoryGB())
    18  }