// time.Sleep(time.Duration(3)*time.Second)
// }()
go func(){
+ fmt.Printf("PID:%d\n",os.Getpid())
for{
View()
time.Sleep(time.Duration(60)*time.Second)
func View(){
// var memStats runtime.MemStats
// runtime.ReadMemStats(&memStats)
- fmt.Printf("=====\n")
- fmt.Printf("PID:%d\n",os.Getpid())
+ // fmt.Printf("=====\n")
// fmt.Printf("总内存:%v MB\n",memStats.Alloc/1024e2/8)
// fmt.Printf("GC次数:%v \n",memStats.NumGC)
// fmt.Printf("堆 :%v %v MB\n",memStats.HeapInuse/1024e2/8,(memStats.HeapIdle - memStats.HeapReleased)/1024e2/8)
- fmt.Printf("=====\n")
+ // fmt.Printf("=====\n")
}
\ No newline at end of file