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:
2026-11-19 11:01:18 +01:00
co-authored by Claude Sonnet 5.5
parent c653ae4206
commit 960a6e66d0
4 changed files with 183 additions and 3 deletions
+6
View File
@@ -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