MCPcopy Index your code
hub / github.com/git-bug/git-bug / benchmarkReadBugs

Function benchmarkReadBugs

tests/read_bugs_test.go:24–38  ·  view source on GitHub ↗
(bugNumber int, t *testing.B)

Source from the content-addressed store, hash-verified

22}
23
24func 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
40func BenchmarkReadBugs5(b *testing.B) { benchmarkReadBugs(5, b) }
41func BenchmarkReadBugs25(b *testing.B) { benchmarkReadBugs(25, b) }

Callers 3

BenchmarkReadBugs5Function · 0.85
BenchmarkReadBugs25Function · 0.85
BenchmarkReadBugs150Function · 0.85

Calls 4

CreateGoGitTestRepoFunction · 0.92
FillRepoWithSeedFunction · 0.92
ReadAllFunction · 0.92
FatalMethod · 0.80

Tested by

no test coverage detected