(b *testing.B)
| 27 | } |
| 28 | |
| 29 | func BenchmarkWrappedRecordsLoopWithAll(b *testing.B) { |
| 30 | setupRecords(b, true) |
| 31 | defer teardownRecords(b) |
| 32 | |
| 33 | records, err := storage.LoadRecords(testFolder) |
| 34 | if err != nil { |
| 35 | b.Fatal(err) |
| 36 | } |
| 37 | wrapped := WrapRecords(records) |
| 38 | |
| 39 | b.ResetTimer() |
| 40 | for i := 0; i < b.N; i++ { |
| 41 | if all := wrapped.All(); len(all) != testRecords { |
| 42 | b.Fatalf("expected %d wrapped records, got %d", testRecords, len(all)) |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func BenchmarkWrappedRecordsLoopWithAllBut(b *testing.B) { |
| 48 | setupRecords(b, true) |
nothing calls this directly
no test coverage detected