formatted testing codes

This commit is contained in:
andy pan 2018-07-02 14:56:20 +08:00
parent 360a5be5f7
commit 5c1e3a17bb
1 changed files with 11 additions and 11 deletions

View File

@ -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) {