优化IP库内存

This commit is contained in:
GoEdgeLab
2022-08-22 08:31:53 +08:00
parent 2dbc6e53d5
commit 6abdf13e2e
5 changed files with 86 additions and 43 deletions

View File

@@ -12,6 +12,15 @@ import (
"time"
)
func TestIPLibrary_Init(t *testing.T) {
var lib = iplibrary.NewIPLibrary()
err := lib.Init()
if err != nil {
t.Fatal(err)
}
}
func TestIPLibrary_Lookup(t *testing.T) {
var stat1 = &runtime.MemStats{}
runtime.ReadMemStats(stat1)