]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/sqlite/sqlite-storage_test.go
gorond
[btrtrc.git] / storage / sqlite / sqlite-storage_test.go
index 390c68f47e18ec80c346ff9655819a8559bd89a4..a566322d708b5d78075e983684f58d4f3d698ae1 100644 (file)
@@ -8,15 +8,15 @@ import (
        "fmt"
        "path/filepath"
        "testing"
-       "time"
 
        _ "github.com/anacrolix/envpprof"
        "github.com/anacrolix/squirrel"
+       "github.com/dustin/go-humanize"
+       qt "github.com/frankban/quicktest"
+
        "github.com/anacrolix/torrent/storage"
        test_storage "github.com/anacrolix/torrent/storage/test"
        "github.com/anacrolix/torrent/test"
-       "github.com/dustin/go-humanize"
-       qt "github.com/frankban/quicktest"
 )
 
 func TestLeecherStorage(t *testing.T) {
@@ -39,7 +39,6 @@ func TestLeecherStorage(t *testing.T) {
 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.
@@ -53,7 +52,6 @@ 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)
@@ -69,10 +67,7 @@ func BenchmarkMarkComplete(b *testing.B) {
                                var opts NewDirectStorageOpts
                                opts.Memory = memory
                                opts.Capacity = capacity
-                               // 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)