]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix benchmark failures
authorMatt Joiner <anacrolix@gmail.com>
Sat, 9 Mar 2024 23:39:27 +0000 (10:39 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 9 Mar 2024 23:39:27 +0000 (10:39 +1100)
go.mod
go.sum
request-strategy-impls_test.go

diff --git a/go.mod b/go.mod
index 51402c253d78d77aa68fb87cd2659dcbfb12428a..31ef76ecefd6589993f429d1b97f95dace06f320 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
        github.com/anacrolix/fuse v0.2.0
        github.com/anacrolix/generics v0.0.2-0.20240227122613-f95486179cab
        github.com/anacrolix/go-libutp v1.3.1
-       github.com/anacrolix/log v0.14.6-0.20231202035202-ed7a02cad0b4
+       github.com/anacrolix/log v0.15.2
        github.com/anacrolix/missinggo v1.3.0
        github.com/anacrolix/missinggo/perf v1.0.0
        github.com/anacrolix/missinggo/v2 v2.7.3
diff --git a/go.sum b/go.sum
index 0834ba1b947d37b6a467065e74700b41ed940162..3a1efa131c87f09041adeb6bf11a6ed19674edb7 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -85,8 +85,8 @@ github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgw
 github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
 github.com/anacrolix/log v0.10.1-0.20220123034749-3920702c17f8/go.mod h1:GmnE2c0nvz8pOIPUSC9Rawgefy1sDXqposC2wgtBZE4=
 github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68=
-github.com/anacrolix/log v0.14.6-0.20231202035202-ed7a02cad0b4 h1:CdVK9IoqoqklXQQ4+L2aew64xsz14KdOD+rnKdTQajg=
-github.com/anacrolix/log v0.14.6-0.20231202035202-ed7a02cad0b4/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY=
+github.com/anacrolix/log v0.15.2 h1:LTSf5Wm6Q4GNWPFMBP7NPYV6UBVZzZLKckL+/Lj72Oo=
+github.com/anacrolix/log v0.15.2/go.mod h1:m0poRtlr41mriZlXBQ9SOVZ8yZBkLjOkDhd5Li5pITA=
 github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62 h1:P04VG6Td13FHMgS5ZBcJX23NPC/fiC4cp9bXwYujdYM=
 github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62/go.mod h1:66cFKPCO7Sl4vbFnAaSq7e4OXtdMhRSBagJGWgmpJbM=
 github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s=
index ad15166259fe962e8063f397d1b5275788a0e6ca..322b9913332b53d7fd6ecc8a4036c8d626a020f0 100644 (file)
@@ -5,6 +5,7 @@ import (
        "runtime"
        "testing"
 
+       g "github.com/anacrolix/generics"
        "github.com/anacrolix/missinggo/v2/iter"
        "github.com/davecgh/go-spew/spew"
        qt "github.com/frankban/quicktest"
@@ -12,6 +13,7 @@ import (
        "github.com/anacrolix/torrent/metainfo"
        request_strategy "github.com/anacrolix/torrent/request-strategy"
        "github.com/anacrolix/torrent/storage"
+       infohash_v2 "github.com/anacrolix/torrent/types/infohash-v2"
 )
 
 func makeRequestStrategyPiece(t request_strategy.Torrent) request_strategy.Piece {
@@ -81,7 +83,8 @@ func BenchmarkRequestStrategy(b *testing.B) {
        cl := newTestingClient(b)
        storageClient := storageClient{}
        tor, new := cl.AddTorrentOpt(AddTorrentOpts{
-               Storage: &storageClient,
+               InfoHashV2: g.Some(infohash_v2.FromHexString("deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef")),
+               Storage:    &storageClient,
        })
        tor.disableTriggers = true
        c.Assert(new, qt.IsTrue)