forked from mirror/ants
Merge branch 'develop'
This commit is contained in:
commit
b487ac3355
|
@ -10,7 +10,7 @@ before_install:
|
||||||
- go get -t -v ./...
|
- go get -t -v ./...
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -race -coverprofile=coverage.txt -covermode=atomic
|
- go test -race -coverprofile=coverage.txt -covermode=atomic -v
|
||||||
# - go test -bench=. -benchmem=true -run=none ./...
|
# - go test -bench=. -benchmem=true -run=none ./...
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
|
|
|
@ -43,8 +43,8 @@ const (
|
||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
RunTimes = 10000000
|
RunTimes = 10000000
|
||||||
Param = 10
|
Param = 100
|
||||||
AntsSize = 50000
|
AntsSize = 500
|
||||||
)
|
)
|
||||||
|
|
||||||
func demoFunc() error {
|
func demoFunc() error {
|
||||||
|
|
|
@ -47,6 +47,7 @@ func TestAntsPoolWithFunc(t *testing.T) {
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
t.Logf("pool with func, running workers number:%d", p.Running())
|
||||||
mem := runtime.MemStats{}
|
mem := runtime.MemStats{}
|
||||||
runtime.ReadMemStats(&mem)
|
runtime.ReadMemStats(&mem)
|
||||||
t.Logf("memory usage:%d", mem.TotalAlloc/GiB)
|
t.Logf("memory usage:%d", mem.TotalAlloc/GiB)
|
||||||
|
|
Loading…
Reference in New Issue