Skip to content

Commit

Permalink
Re-introduce debugging prints for memory use
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Shah committed Dec 19, 2016
1 parent 9d8f788 commit bbce95e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"net"
"os"
"path/filepath"
"runtime"
"sync"
"time"

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit bbce95e

Please sign in to comment.