(b *testing.B)
| 5 | ) |
| 6 | |
| 7 | func BenchmarkOraclesFind(b *testing.B) { |
| 8 | setupOracles(b, true, false, false) |
| 9 | defer teardownOracles(b) |
| 10 | |
| 11 | oracles, err := LoadOracles(testFolder) |
| 12 | if err != nil { |
| 13 | b.Fatal(err) |
| 14 | } |
| 15 | |
| 16 | for i := 0; i < b.N; i++ { |
| 17 | id := uint64(i%testOracles) + 1 |
| 18 | if o := oracles.Find(id); o == nil { |
| 19 | b.Fatalf("oracle with id %d not found", id) |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | func BenchmarkOraclesUpdate(b *testing.B) { |
| 25 | setupOracles(b, true, false, false) |
nothing calls this directly
no test coverage detected