Commit 1b20165e authored by 王明明's avatar 王明明

内存分析

parent ec45d653
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"io" "io"
"log" "log"
"net/http" "net/http"
_ "net/http/pprof"
"os" "os"
"path" "path"
"test/model" "test/model"
...@@ -21,6 +22,10 @@ func WelcomeHandler(w http.ResponseWriter, r *http.Request) { ...@@ -21,6 +22,10 @@ func WelcomeHandler(w http.ResponseWriter, r *http.Request) {
} }
func main() { func main() {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
logname := flag.String("logname", "akm.log", "日志文件名") logname := flag.String("logname", "akm.log", "日志文件名")
flag.Parse() flag.Parse()
logrus.SetLevel(logrus.TraceLevel) logrus.SetLevel(logrus.TraceLevel)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment