(b *testing.B)
| 96 | } |
| 97 | |
| 98 | func BenchmarkBasic(b *testing.B) { |
| 99 | for api, testsize := range testSizes { |
| 100 | b.Run(testsize.Name, func(b *testing.B) { |
| 101 | verify := verifyIndex[api] |
| 102 | ap := testsize.AP |
| 103 | b.SetBytes(int64(ap.TotalSize())) |
| 104 | for i := 0; i < b.N; i++ { |
| 105 | it := basic.NewIterator(ap) |
| 106 | total := 0 |
| 107 | for index, err := it.Next(); err == nil; index, err = it.Next() { |
| 108 | total += verify[index] * index |
| 109 | } |
| 110 | _ = total |
| 111 | } |
| 112 | }) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func TestInstruct(t *testing.T) { |
| 117 | if skipUseless { |
nothing calls this directly
no test coverage detected