diff --git a/channel.go b/channel.go index de7d12e8..b5cb761e 100644 --- a/channel.go +++ b/channel.go @@ -26,6 +26,7 @@ import ( "net" "os" "path/filepath" + "runtime" "sync" "time" @@ -685,6 +686,11 @@ func (ch *Channel) onClosed() { ch.log.Info("Timer wheel stopped.") } ch.log.Info("Channel closed.") + // FIXME + const mebibyte = 1048576 + m := runtime.MemStats{} + runtime.ReadMemStats(&m) + fmt.Printf("SYSTEM MEMORY: %v MiB\n", m.Sys/mebibyte) } // Closed returns whether this channel has been closed with .Close()