Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Aug 31, 2018
1 parent e25a58c commit b1e6e05
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions ants_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,42 +130,4 @@ func TestCodeCov(t *testing.T) {
p.ReSize(TestSize)
p.ReSize(AntsSize)
t.Logf("pool with func, after resize, capacity:%d, running:%d", p.Cap(), p.Running())
}

// func TestNoPool(t *testing.T) {
// var wg sync.WaitGroup
// for i := 0; i < n; i++ {
// wg.Add(1)
// go func() {
// demoPoolFunc(n)
// wg.Done()
// }()
// }

// wg.Wait()
// mem := runtime.MemStats{}
// runtime.ReadMemStats(&mem)
// t.Logf("memory usage:%d", mem.TotalAlloc/GiB)
// }

//func TestCustomPool(t *testing.T) {
// p, _ := ants.NewPool(30000)
// var wg sync.WaitGroup
// for i := 0; i < n; i++ {
// wg.Add(1)
// p.Submit(func() {
// demoFunc()
// //demoFunc()
// wg.Done()
// })
// }
// wg.Wait()
//
// //t.Logf("pool capacity:%d", p.Cap())
// //t.Logf("free workers number:%d", p.Free())
//
// t.Logf("running workers number:%d", p.Running())
// mem := runtime.MemStats{}
// runtime.ReadMemStats(&mem)
// t.Logf("memory usage:%d", mem.TotalAlloc/1024)
//}
}

0 comments on commit b1e6e05

Please sign in to comment.