This commit is contained in:
andy pan 2018-05-23 11:17:00 +08:00
parent 19e41472a9
commit 86325a5f3e
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ import (
"github.com/panjf2000/ants"
)
var n = 100000
var n = 10000000
//func demoFunc() {
// var n int
@ -110,7 +110,7 @@ func TestAntsPoolWithFunc(t *testing.T) {
t.Logf("running workers number:%d", p.Running())
mem := runtime.MemStats{}
runtime.ReadMemStats(&mem)
t.Logf("memory usage:%d", mem.TotalAlloc/1024)
t.Logf("memory usage:%d", mem.TotalAlloc/GiB)
}
func TestNoPool(t *testing.T) {
@ -126,7 +126,7 @@ func TestNoPool(t *testing.T) {
wg.Wait()
mem := runtime.MemStats{}
runtime.ReadMemStats(&mem)
t.Logf("memory usage:%d", mem.TotalAlloc/1024)
t.Logf("memory usage:%d", mem.TotalAlloc/GiB)
}
//func TestCustomPool(t *testing.T) {