MCPcopy Create free account
hub / github.com/CPChain/chain / StopGoTrace

Method StopGoTrace

internal/profile/handler.go:126–138  ·  view source on GitHub ↗

StopTrace stops an ongoing trace.

()

Source from the content-addressed store, hash-verified

124
125// StopTrace stops an ongoing trace.
126func (h *HandlerT) StopGoTrace() error {
127 h.mu.Lock()
128 defer h.mu.Unlock()
129 trace.Stop()
130 if h.traceW == nil {
131 return errors.New("trace not in progress")
132 }
133 log.Info("Done writing Go trace", "dump", h.traceFile)
134 h.traceW.Close()
135 h.traceW = nil
136 h.traceFile = ""
137 return nil
138}
139
140// StartBlockingProfile starts blocking profiling.
141// rate 0 disables block profiling.

Callers

nothing calls this directly

Calls 5

LockMethod · 0.80
UnlockMethod · 0.80
StopMethod · 0.65
InfoMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected