mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 06:28:20 +00:00
Debug around pprof
This commit is contained in:
14
main.go
14
main.go
@ -79,11 +79,17 @@ func main() {
|
||||
//Don't flash white
|
||||
p.win.SDLWin.GLSwap()
|
||||
|
||||
var pf, _ = os.Create("pprof.cpu")
|
||||
defer pf.Close()
|
||||
pprof.StartCPUProfile(pf)
|
||||
if consts.Mode_Debug {
|
||||
var pf, _ = os.Create("pprof.cpu")
|
||||
defer pf.Close()
|
||||
pprof.StartCPUProfile(pf)
|
||||
}
|
||||
|
||||
engine.Run(p, p.win, p.imguiInfo)
|
||||
pprof.StopCPUProfile()
|
||||
|
||||
if consts.Mode_Debug {
|
||||
pprof.StopCPUProfile()
|
||||
}
|
||||
}
|
||||
|
||||
func (p *program) Init() {
|
||||
|
||||
Reference in New Issue
Block a user