BUILD: add pprof
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3556a4d54c
commit
9105a180c6
|
@ -14,6 +14,7 @@ example-gocui-active/example-gocui-active
|
||||||
example-gocui-colorstrue/example-gocui-colorstrue
|
example-gocui-colorstrue/example-gocui-colorstrue
|
||||||
example-gocui-dynamic/example-gocui-dynamic
|
example-gocui-dynamic/example-gocui-dynamic
|
||||||
example-gocui-mouse/example-gocui-mouse
|
example-gocui-mouse/example-gocui-mouse
|
||||||
|
example-pprof/example-pprof
|
||||||
example-shell/example-shell
|
example-shell/example-shell
|
||||||
example-systray/example-systray
|
example-systray/example-systray
|
||||||
example-ui-controlgallery/example-ui-controlgallery
|
example-ui-controlgallery/example-ui-controlgallery
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -24,6 +24,9 @@ build:
|
||||||
cd example-ui-radiobutton; go install # slidebars, lists, radio buttons
|
cd example-ui-radiobutton; go install # slidebars, lists, radio buttons
|
||||||
cd example-ui-table; go install # spreadsheet
|
cd example-ui-table; go install # spreadsheet
|
||||||
|
|
||||||
|
# golang things
|
||||||
|
cd example-pprof; go install # dump out go process internals
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
go build -ldflags "-X main.GITCOMMIT=${GITCOMMIT} -X main.GOVERSION='${GOVERSION}' -X main.BUILDTIME='${BUILDTIME}' -X main.VERSION=${VERSION}"
|
go build -ldflags "-X main.GITCOMMIT=${GITCOMMIT} -X main.GOVERSION='${GOVERSION}' -X main.BUILDTIME='${BUILDTIME}' -X main.VERSION=${VERSION}"
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,9 @@ func main() {
|
||||||
http.HandleFunc("/block", func(rw http.ResponseWriter, req *http.Request) {
|
http.HandleFunc("/block", func(rw http.ResponseWriter, req *http.Request) {
|
||||||
usesAResource()
|
usesAResource()
|
||||||
})
|
})
|
||||||
|
log.Println("run this and then hit:")
|
||||||
|
log.Println("http://localhost:6060/debug/pprof/")
|
||||||
|
log.Println("")
|
||||||
log.Println("Running!")
|
log.Println("Running!")
|
||||||
log.Println(http.ListenAndServe("localhost:6060", nil))
|
log.Println(http.ListenAndServe("localhost:6060", nil))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue