mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +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
|
//Don't flash white
|
||||||
p.win.SDLWin.GLSwap()
|
p.win.SDLWin.GLSwap()
|
||||||
|
|
||||||
var pf, _ = os.Create("pprof.cpu")
|
if consts.Mode_Debug {
|
||||||
defer pf.Close()
|
var pf, _ = os.Create("pprof.cpu")
|
||||||
pprof.StartCPUProfile(pf)
|
defer pf.Close()
|
||||||
|
pprof.StartCPUProfile(pf)
|
||||||
|
}
|
||||||
|
|
||||||
engine.Run(p, p.win, p.imguiInfo)
|
engine.Run(p, p.win, p.imguiInfo)
|
||||||
pprof.StopCPUProfile()
|
|
||||||
|
if consts.Mode_Debug {
|
||||||
|
pprof.StopCPUProfile()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *program) Init() {
|
func (p *program) Init() {
|
||||||
|
|||||||
Reference in New Issue
Block a user