We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e70178 commit 625a704Copy full SHA for 625a704
zh/11.3.md
@@ -154,11 +154,12 @@ func Benchmark_TimeConsumingFunction(b *testing.B) {
154
```
155
156
我们执行命令`go test webbench_test.go -test.bench=".*"`,可以看到如下结果:
157
-
+```
158
Benchmark_Division-4 500000000 7.76 ns/op 456 B/op 14 allocs/op
159
Benchmark_TimeConsumingFunction-4 500000000 7.80 ns/op 224 B/op 4 allocs/op
160
PASS
161
ok gotest 9.364s
162
163
164
上面的结果显示我们没有执行任何`TestXXX`的单元测试函数,显示的结果只执行了压力测试函数,第一条显示了`Benchmark_Division`执行了500000000次,每次的执行平均时间是7.76纳秒,第二条显示了`Benchmark_TimeConsumingFunction`执行了500000000,每次的平均执行时间是7.80纳秒。最后一条显示总共的执行时间。
165
0 commit comments