From 1d5ab0b8684573e2c1ef1dfaf26cec6af9ab169e Mon Sep 17 00:00:00 2001 From: Cole Brown Date: Tue, 26 Jun 2018 20:18:25 -0400 Subject: [PATCH] Update benchmark timings to stress peerstores more --- benchmark_utils.go | 3 ++- peerstore_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 {