(bugNumber int, t *testing.B)
| 22 | } |
| 23 | |
| 24 | func benchmarkReadBugs(bugNumber int, t *testing.B) { |
| 25 | repo := repository.CreateGoGitTestRepo(t, false) |
| 26 | |
| 27 | random_bugs.FillRepoWithSeed(repo, bugNumber, 42) |
| 28 | t.ResetTimer() |
| 29 | |
| 30 | for n := 0; n < t.N; n++ { |
| 31 | bugs := bug.ReadAll(repo) |
| 32 | for b := range bugs { |
| 33 | if b.Err != nil { |
| 34 | t.Fatal(b.Err) |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func BenchmarkReadBugs5(b *testing.B) { benchmarkReadBugs(5, b) } |
| 41 | func BenchmarkReadBugs25(b *testing.B) { benchmarkReadBugs(25, b) } |
no test coverage detected