body-drain: rename server stat new= to accepted_total= to avoid reading it as open conns

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GbnJj9ZqEx9nUvzkjdwfMq
This commit is contained in:
2026-08-29 00:05:00 +02:00
co-authored by Claude Fable 5
parent 57349285b4
commit f80ba127d8
+3 -1
View File
@@ -143,7 +143,9 @@ func serveForever(addr string) {
s.close()
return
case <-tick.C:
fmt.Printf("%s new=%d active=%d goroutines=%d\n",
// accepted_total only ever grows (every conn ever accepted);
// active is what's open right now.
fmt.Printf("%s accepted_total=%d active=%d goroutines=%d\n",
time.Now().Format("15:04:05"), s.newConns.Load(), s.activeConns.Load(), runtime.NumGoroutine())
}
}