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:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user