[scripts] Add pprof invocation as web server.

This commit is contained in:
Ciprian Dorin Craciun 2021-12-16 18:10:05 +02:00
parent 8eabc1108a
commit 682f6abf22
2 changed files with 13 additions and 3 deletions

View file

@ -77,14 +77,26 @@
#
!!
<< benchmark / server / profile / cpu / analyze
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
exec -- go tool pprof "${@}" -- ./.outputs/server-cpu.txt
!!
<< benchmark / server / profile / cpu / analyze / web
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
exec -- go tool pprof -http 127.108.221.132:8080 -no_browser -functions "${@}" -- ./.outputs/server-cpu.txt
!!
<< benchmark / server / profile / mem / analyze
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
exec -- go tool pprof "${@}" ./.outputs/server-mem.txt
exec -- go tool pprof "${@}" -- ./.outputs/server-mem.txt
!!
<< benchmark / server / profile / mem / analyze / web
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
exec -- go tool pprof "${@}" -http 127.108.221.132:8080 -no_browser -functions -- ./.outputs/server-mem.txt
!!

View file

@ -297,8 +297,6 @@ func (_server *server) Serve (_context *fasthttp.RequestCtx) () {
_responseStatus := http.StatusOK
//! _responseHeaders.AddRawLines (_dataMetaRaw)
_handleHeader := func (_name []byte, _value []byte) {
if _name[0] != '!' {
_responseHeaders.AddBytesKV (_name, _value)