MCPcopy Create free account
hub / github.com/bytebase/bytebase / dumpHeapProfile

Function dumpHeapProfile

backend/runner/monitor/monitor.go:108–116  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

106}
107
108func dumpHeapProfile(fileName string) error {
109 f, err := os.Create(fileName)
110 if err != nil {
111 return errors.Errorf("could not create memory profile file: %v", err)
112 }
113 defer f.Close()
114
115 return pprof.WriteHeapProfile(f)
116}
117
118func dumpGoroutineProfile(fileName string) error {
119 f, err := os.Create(fileName)

Callers 1

checkMemoryMethod · 0.85

Calls 2

ErrorfMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected