allmende-conns -relay: the relay holds 128 reservations of 200 asked, 67 MB; measured and documented
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -32,6 +32,7 @@ func main() {
|
||||
region := flag.String("region", "u1x", "region whose listing topic every client subscribes to")
|
||||
hold := flag.Duration("hold", time.Minute, "how long to keep them open once connected")
|
||||
parallel := flag.Int("parallel", 25, "connections made at the same time")
|
||||
relay := flag.Bool("relay", false, "measure the node as a relay instead: -n clients take a reservation on it, then pairs talk through it")
|
||||
flag.Parse()
|
||||
if *nodeAddr == "" {
|
||||
fmt.Fprintln(os.Stderr, "usage: allmende-conns -node <multiaddr> [-n 1000] [-region u1x] [-hold 1m]")
|
||||
@@ -51,6 +52,11 @@ func main() {
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer stop()
|
||||
|
||||
if *relay {
|
||||
runRelay(ctx, target, *n, *parallel, *hold)
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
hosts []host.Host
|
||||
mu sync.Mutex
|
||||
|
||||
Reference in New Issue
Block a user