forked from mirror/ants
formatted testing codes
This commit is contained in:
parent
360a5be5f7
commit
5c1e3a17bb
|
@ -32,14 +32,14 @@ import (
|
|||
|
||||
const (
|
||||
_ = 1 << (10 * iota)
|
||||
KiB // 1024
|
||||
MiB // 1048576
|
||||
GiB // 1073741824
|
||||
TiB // 1099511627776 (超过了int32的范围)
|
||||
PiB // 1125899906842624
|
||||
EiB // 1152921504606846976
|
||||
ZiB // 1180591620717411303424 (超过了int64的范围)
|
||||
YiB // 1208925819614629174706176
|
||||
KiB // 1024
|
||||
MiB // 1048576
|
||||
GiB // 1073741824
|
||||
TiB // 1099511627776 (超过了int32的范围)
|
||||
PiB // 1125899906842624
|
||||
EiB // 1152921504606846976
|
||||
ZiB // 1180591620717411303424 (超过了int64的范围)
|
||||
YiB // 1208925819614629174706176
|
||||
)
|
||||
const RunTimes = 1000000
|
||||
const loop = 10
|
||||
|
@ -57,9 +57,9 @@ func demoPoolFunc(args interface{}) error {
|
|||
// n += i
|
||||
//}
|
||||
//return nil
|
||||
n := args.(int)
|
||||
time.Sleep(time.Duration(n) * time.Millisecond)
|
||||
return nil
|
||||
n := args.(int)
|
||||
time.Sleep(time.Duration(n) * time.Millisecond)
|
||||
return nil
|
||||
}
|
||||
|
||||
func BenchmarkGoroutineWithFunc(b *testing.B) {
|
||||
|
|
Loading…
Reference in New Issue