6 "github.com/anacrolix/torrent/storage"
7 test_storage "github.com/anacrolix/torrent/storage/test"
10 func BenchmarkMarkComplete(b *testing.B) {
11 bench := func(b *testing.B, ci storage.ClientImpl) {
12 test_storage.BenchmarkPieceMarkComplete(
13 b, ci, test_storage.DefaultPieceSize, test_storage.DefaultNumPieces, 0)
15 b.Run("File", func(b *testing.B) {
16 ci := storage.NewFile(b.TempDir())
17 b.Cleanup(func() { ci.Close() })
20 b.Run("Mmap", func(b *testing.B) {
21 ci := storage.NewMMap(b.TempDir())
22 b.Cleanup(func() { ci.Close() })
25 b.Run("BoltDb", func(b *testing.B) {
26 ci := storage.NewBoltDB(b.TempDir())
27 b.Cleanup(func() { ci.Close() })