From: Matt Joiner Date: Sat, 9 Mar 2024 23:39:27 +0000 (+1100) Subject: Fix benchmark failures X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c7375cf162cde624a643fff5dfeda6eb996d92cf;p=btrtrc.git Fix benchmark failures --- diff --git a/go.mod b/go.mod index 51402c25..31ef76ec 100644 --- 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 0834ba1b..3a1efa13 100644 --- 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= diff --git a/request-strategy-impls_test.go b/request-strategy-impls_test.go index ad151662..322b9913 100644 --- a/request-strategy-impls_test.go +++ b/request-strategy-impls_test.go @@ -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)