Hi,
I’m interested in profiling and benchmarking Caddy running on an ARM platform.
I’ve been running h2load benchmarks on it and getting some interesting results.
For profiling, I’ve looked at using davecheney’s GitHub - pkg/profile: Simple profiling for Go profiler, I’ve started by naively putting the profiling lines into caddy/caddy/main.go like this:
package main
import "github.com/mholt/caddy/caddy/caddymain"
import "github.com/pkg/profile"
var run = caddymain.Run // replaced for tests
func main() {
defer profile.Start().Stop()
run()
}
I get the message profile: cpu profiling enabled, /tmp/profile385684916/cpu.pprof
now when I start Caddy before the Activating privacy features message, as expected. But from trying a few times in different ways, that pprof file has always been empty. I’ve read that it’s only written to if the program being profiled exits normally, I’ve been doing Ctrl+C to end Caddy (which I think should be OK?) after running it for a few minutes and generating load. Is there a better way to go about getting some profiling results, or might know why this file is empty?
Thanks.