Skip to content

document how to do a start/defer style profile dumpΒ #38

@grosser

Description

@grosser

I want to do multiple runs of my code, dump each to a file and then open them in a flamgraph viewer, normally I do this:

  f, _ := os.Create("cpu.prof")
  pprof.StartCPUProfile(f)
  defer pprof.StopCPUProfile()

... here it seems to be:

f, _ := os.Create("cpu.prof")
stop := fgprof.Start(f, "pprof")
defer stop()

but some proper Readme docs would be great

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions