I'm running go application as systemd service. I've enabled cpu profile 
using pprof as specified in documents. When service ran, it's creating file 
but no samples are getting written to file.
Does it required any special build arguments?

       f, err := os.Create("/tmp/cpu.prof")
        if err != nil {
                log.Fatal("could not create CPU profile: ", err)
        }
        defer f.Close()

        if err := pprof.StartCPUProfile(f); err != nil {
                log.Fatal("could not start CPU profile: ", err)
        }
        defer pprof.StopCPUProfile()

Thanks,
BLN

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/badd02b7-7880-4ce4-a723-654abcd8adfa%40googlegroups.com.

Reply via email to