Skip to content

Commit

Permalink
fix: complete the translation of the benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
mahuihuang authored and everyx committed Apr 9, 2022
1 parent 2efabe3 commit 7c6d321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/testing-and-benchmarking/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ func TestIntMinTableDriven(t *testing.T) {
// `testing` 运行器多次执行每个基准测试函数,并在每次运行时增加 `b.N`,
// 直到它收集到精确的测量值。
func BenchmarkIntMin(b *testing.B) {
// Typically the benchmark runs a function we're
// benchmarking in a loop `b.N` times.
// 通常,基准测试运行一个函数,我们在一个 `b.N` 次的循环内进行基准测试。
for i := 0; i < b.N; i++ {
IntMin(1, 2)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cb7953373f2f5df81e3e1e40a35ca15ee4e4c81d
NZzDRI7OOv0
c165fa6a683ec3adf93deab67dbe19665778f421
6_USpbeJGKP

0 comments on commit 7c6d321

Please sign in to comment.