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

Method StopGoTrace

internal/debug/trace.go:51–63  ·  view source on GitHub ↗

StopTrace stops an ongoing trace.

()

Source from the content-addressed store, hash-verified

49
50// StopTrace stops an ongoing trace.
51func (h *HandlerT) StopGoTrace() error {
52 h.mu.Lock()
53 defer h.mu.Unlock()
54 trace.Stop()
55 if h.traceW == nil {
56 return errors.New("trace not in progress")
57 }
58 log.Info("Done writing Go trace", "dump", h.traceFile)
59 h.traceW.Close()
60 h.traceW = nil
61 h.traceFile = ""
62 return nil
63}

Callers 2

GoTraceMethod · 0.95
ExitFunction · 0.45

Calls 5

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

Tested by

no test coverage detected