ong
ong copied to clipboard
add mem and cpu stats to the debug/pprof server
We have a debug/pprof server at; https://github.com/komuw/ong/blob/b92e69a03db65758d69c9167465c362ddbe5b0b9/server/pprof.go#L19
We should add more stats to it. Look at how golang/pkgsite[1][2] does it;
- https://github.com/golang/pkgsite/blob/8b9886cdffa22a4f43206ac784fa1646fd0b6da6/internal/memory/memory.go
- https://github.com/golang/pkgsite/blob/0b288825799277442e38232a9e9d079bc5956ef4/internal/frontend/server.go#L217-L240
will this also work if running in docker?
see also: https://github.com/komuw/ong/issues/13
https://github.com/tailscale/tailscale/blob/0de66386d46c10ab5a7e57432dfa00e6558658f1/metrics/metrics.go
- https://github.com/tailscale/tailscale/blob/62bc1052a28c46f4457a7bab16a6398bdf22b6b5/cmd/pgproxy/pgproxy.go#L79
- https://github.com/tailscale/tailscale/blob/62bc1052a28c46f4457a7bab16a6398bdf22b6b5/cmd/pgproxy/pgproxy.go#L151-L158
https://cs.opensource.google/go/x/pkgsite/+/ea431292:internal/memory/memory.go