]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add const noCacheBlobs in sqlite storage benchmarks
authorMatt Joiner <anacrolix@gmail.com>
Mon, 10 Jan 2022 05:20:03 +0000 (16:20 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 10 Jan 2022 05:20:03 +0000 (16:20 +1100)
storage/sqlite/sqlite-storage_test.go

index 2116c01b35471f4d561eca691c15b35e82b04777..e63f7bc8bcf43927851b31d26ba4575291d50f4f 100644 (file)
@@ -18,6 +18,7 @@ import (
 func BenchmarkMarkComplete(b *testing.B) {
        const pieceSize = test_storage.DefaultPieceSize
        const noTriggers = false
+       const noCacheBlobs = false
        var capacity int64 = test_storage.DefaultNumPieces * pieceSize / 2
        if noTriggers {
                // Since we won't push out old pieces, we have to mark them incomplete manually.
@@ -31,6 +32,7 @@ func BenchmarkMarkComplete(b *testing.B) {
                var opts squirrel.NewCacheOpts
                opts.Capacity = capacity
                opts.NoTriggers = noTriggers
+               opts.NoCacheBlobs = noCacheBlobs
                benchOpts := func(b *testing.B) {
                        opts.Path = filepath.Join(b.TempDir(), "storage.db")
                        ci, err := NewDirectStorage(opts)
@@ -49,6 +51,7 @@ func BenchmarkMarkComplete(b *testing.B) {
                                // opts.GcBlobs = true
                                opts.BlobFlushInterval = time.Second
                                opts.NoTriggers = noTriggers
+                               opts.NoCacheBlobs = noCacheBlobs
                                directBench := func(b *testing.B) {
                                        opts.Path = filepath.Join(b.TempDir(), "storage.db")
                                        ci, err := NewDirectStorage(opts)