]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/sqlite/sqlite-storage_test.go
Use BenchmarkMarkComplete for non-sqlite storages too
[btrtrc.git] / storage / sqlite / sqlite-storage_test.go
index 3f599d5169278051b8da00f591151ad3e18cb177..a903e3a9c5bd37b3093952b39810199dddec27b1 100644 (file)
@@ -67,8 +67,8 @@ func TestSimultaneousIncrementalBlob(t *testing.T) {
 }
 
 func BenchmarkMarkComplete(b *testing.B) {
-       const pieceSize = 2 << 20
-       const capacity = 0
+       const pieceSize = test_storage.DefaultPieceSize
+       const capacity = test_storage.DefaultCapacity
        c := qt.New(b)
        for _, memory := range []bool{false, true} {
                b.Run(fmt.Sprintf("Memory=%v", memory), func(b *testing.B) {
@@ -90,7 +90,7 @@ func BenchmarkMarkComplete(b *testing.B) {
                                        })
                                        c.Assert(err, qt.IsNil)
                                        defer ci.Close()
-                                       test_storage.BenchmarkPieceMarkComplete(b, ci, pieceSize, 16, capacity)
+                                       test_storage.BenchmarkPieceMarkComplete(b, ci, pieceSize, test_storage.DefaultNumPieces, capacity)
                                })
                        }
                })