mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-13 11:30:09 +08:00
Update benchmark timings to stress peerstores more
This commit is contained in:
parent
6a9cba0e1b
commit
1d5ab0b868
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user