]> Sergey Matveev's repositories - btrtrc.git/blob - undirtied-chunks-iter_test.go
Add and use typed roaring bitmap
[btrtrc.git] / undirtied-chunks-iter_test.go
1 package torrent
2
3 import (
4         "testing"
5
6         typedRoaring "github.com/anacrolix/torrent/typed-roaring"
7 )
8
9 func BenchmarkUndirtiedChunksIter(b *testing.B) {
10         var bitmap typedRoaring.Bitmap[RequestIndex]
11         a := undirtiedChunksIter{
12                 TorrentDirtyChunks: &bitmap,
13                 StartRequestIndex:  69,
14                 EndRequestIndex:    420,
15         }
16         b.ReportAllocs()
17         for i := 0; i < b.N; i++ {
18                 a.Iter(func(chunkIndex chunkIndexType) {
19
20                 })
21         }
22 }