]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
debug信息
authorqydysky <qydysky@foxmail.com>
Mon, 25 Jan 2021 08:21:33 +0000 (16:21 +0800)
committerqydysky <qydysky@foxmail.com>
Mon, 25 Jan 2021 08:21:33 +0000 (16:21 +0800)
demo/main.go

index 24d932b4ce457b632e61149a86638ab5bc436d28..0754324e9311e666269c2d396749914d18d3d249 100644 (file)
@@ -23,6 +23,7 @@ func main() {
        //      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)
@@ -46,10 +47,9 @@ func main() {
 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