diff --git a/benchmark_utils.go b/benchmark_utils.go index 9e812f9..c66fd07 100644 --- a/benchmark_utils.go +++ b/benchmark_utils.go @@ -6,10 +6,11 @@ import ( "testing" "time" + "math/rand" + "github.com/mr-tron/base58/base58" ma "github.com/multiformats/go-multiaddr" mh "github.com/multiformats/go-multihash" - "math/rand" ) type peerpair struct { diff --git a/peerstore_test.go b/peerstore_test.go index 58b0619..e6d9407 100644 --- a/peerstore_test.go +++ b/peerstore_test.go @@ -331,7 +331,7 @@ func benchmarkPeerstoreRateLimited(ps Peerstore) func(*testing.B) { producer := make(chan *peerpair, 100) addrs := make(chan *peerpair, 100) - go rateLimitedAddressProducer(b, addrs, producer, 10000, time.Millisecond, 500*time.Microsecond) + go rateLimitedAddressProducer(b, addrs, producer, 60000, 100*time.Microsecond, 100*time.Microsecond) b.ResetTimer() for {