From 5c1e3a17bb48db0f8b81680413ec989ab7d6f39b Mon Sep 17 00:00:00 2001 From: andy pan Date: Mon, 2 Jul 2018 14:56:20 +0800 Subject: [PATCH] formatted testing codes --- ants_benchmark_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ants_benchmark_test.go b/ants_benchmark_test.go index aed0a8e..e81dff4 100644 --- a/ants_benchmark_test.go +++ b/ants_benchmark_test.go @@ -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) {