|
|
@@ -3,8 +3,9 @@ package main
|
|
|
|
|
|
import (
|
|
|
"log"
|
|
|
+ "net/http"
|
|
|
+ _ "net/http/pprof"
|
|
|
"os"
|
|
|
- "runtime/pprof"
|
|
|
|
|
|
"battlecamp-go-server/flag"
|
|
|
"battlecamp-go-server/gameserver"
|
|
|
@@ -36,11 +37,6 @@ func initCliFlags() {
|
|
|
flag.ParseFlags()
|
|
|
|
|
|
if *flag.CpuProfile != "" {
|
|
|
- f, err := os.Create(*flag.CpuProfile)
|
|
|
- if err != nil {
|
|
|
- log.Fatal(err)
|
|
|
- }
|
|
|
- pprof.StartCPUProfile(f)
|
|
|
- defer pprof.StopCPUProfile()
|
|
|
+ log.Println(http.ListenAndServe("localhost:6060", nil))
|
|
|
}
|
|
|
}
|