MCPcopy Create free account
hub / github.com/google/pprof / main

Function main

internal/report/testdata/sample/sample.go:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28var cpuProfile = flag.String("cpuprofile", "", "where to write cpu profile")
29
30func main() {
31 flag.Parse()
32 f, err := os.Create(*cpuProfile)
33 if err != nil {
34 log.Fatal("could not create CPU profile: ", err)
35 }
36 if err := pprof.StartCPUProfile(f); err != nil {
37 log.Fatal("could not start CPU profile: ", err)
38 }
39 defer pprof.StopCPUProfile()
40 busyLoop()
41}
42
43func busyLoop() {
44 m := make(map[int]int)

Callers

nothing calls this directly

Calls 2

busyLoopFunction · 0.85
ParseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…