Created
June 11, 2012 09:52
-
-
Save thomas11/2909362 to your computer and use it in GitHub Desktop.
Revisions
-
thomas11 created this gist
Jun 11, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ import ( "runtime" "time" ) ... go func() { for { var m runtime.MemStats runtime.ReadMemStats(&m) log.Printf("\nAlloc = %v\nTotalAlloc = %v\nSys = %v\nNumGC = %v\n\n", m.Alloc / 1024, m.TotalAlloc / 1024, m.Sys / 1024, m.NumGC) time.Sleep(5 * time.Second) } }()