@@ -25,7 +25,7 @@ import (
2525 "github.com/stretchr/testify/require"
2626
2727 "github.com/onflow/atree"
28- "github.com/onflow/atree/test_utils"
28+ testutils "github.com/onflow/atree/test_utils"
2929)
3030
3131var noopValue atree.Value
@@ -193,7 +193,7 @@ func setupArray(b *testing.B, r *rand.Rand, storage *atree.PersistentSlabStorage
193193
194194 address := atree.Address {1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 }
195195
196- typeInfo := test_utils .NewSimpleTypeInfo (42 )
196+ typeInfo := testutils .NewSimpleTypeInfo (42 )
197197
198198 array , err := atree .NewArray (storage , address , typeInfo )
199199 require .NoError (b , err )
@@ -231,7 +231,7 @@ func benchmarkArrayGet(b *testing.B, initialArrayCount, numberOfOps int) {
231231
232232 b .StartTimer ()
233233
234- for range b . N {
234+ for b . Loop () {
235235 for range numberOfOps {
236236 index := getRandomArrayIndex (r , array )
237237 value , _ = array .Get (index )
@@ -249,7 +249,7 @@ func benchmarkArrayInsert(b *testing.B, initialArrayCount, numberOfOps int) {
249249
250250 storage := newTestPersistentStorage (b )
251251
252- for range b . N {
252+ for b . Loop () {
253253
254254 b .StopTimer ()
255255
@@ -273,7 +273,7 @@ func benchmarkArrayRemove(b *testing.B, initialArrayCount, numberOfOps int) {
273273
274274 storage := newTestPersistentStorage (b )
275275
276- for range b . N {
276+ for b . Loop () {
277277
278278 b .StopTimer ()
279279
@@ -298,7 +298,7 @@ func benchmarkArrayRemoveAll(b *testing.B, initialArrayCount int) {
298298
299299 var storable atree.Storable
300300
301- for range b . N {
301+ for b . Loop () {
302302
303303 b .StopTimer ()
304304
@@ -324,7 +324,7 @@ func benchmarkArrayPopIterate(b *testing.B, initialArrayCount int) {
324324
325325 var storable atree.Storable
326326
327- for range b . N {
327+ for b . Loop () {
328328
329329 b .StopTimer ()
330330
@@ -355,7 +355,7 @@ func benchmarkNewArrayFromAppend(b *testing.B, initialArrayCount int) {
355355
356356 b .StartTimer ()
357357
358- for range b . N {
358+ for b . Loop () {
359359 copied , _ := atree .NewArray (storage , array .Address (), array .Type ())
360360
361361 _ = array .IterateReadOnly (func (value atree.Value ) (bool , error ) {
@@ -381,7 +381,7 @@ func benchmarkNewArrayFromBatchData(b *testing.B, initialArrayCount int) {
381381
382382 b .StartTimer ()
383383
384- for range b . N {
384+ for b . Loop () {
385385 iter , err := array .ReadOnlyIterator ()
386386 require .NoError (b , err )
387387
0 commit comments