MCPcopy Create free account
hub / github.com/egonelbre/exp / BenchmarkOrdone

Function BenchmarkOrdone

niterator/iterator_test.go:151–170  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

149}
150
151func BenchmarkOrdone(b *testing.B) {
152 if skipUseless {
153 b.Skip("skipping useless approach")
154 }
155 for api, testsize := range testSizes {
156 b.Run(testsize.Name, func(b *testing.B) {
157 verify := verifyIndex[api]
158 ap := testsize.AP
159 b.SetBytes(int64(ap.TotalSize()))
160 for i := 0; i < b.N; i++ {
161 it := ordone.NewIterator(ap)
162 total := 0
163 for index, err := it.Next(); err == nil; index, err = it.Next() {
164 total += verify[index] * index
165 }
166 _ = total
167 }
168 })
169 }
170}
171
172func TestPremul(t *testing.T) {
173 if skipUseless {

Callers

nothing calls this directly

Calls 4

NextMethod · 0.95
NewIteratorFunction · 0.92
TotalSizeMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected