code: func (h *HandlerT) StopGoTrace() error {
  	h.mu.Lock()
  	defer h.mu.Unlock()
  	trace.Stop()
  	if h.traceW == nil {
  		return errors.New("trace not in progress")
  	}
  	log.Info("Done writing Go trace", "dump", h.traceFile)
  	h.traceW.Close()
  	h.traceW = nil
  	h.traceFile = ""
  	return nil
  }
docs: // StopTrace stops an ongoing trace.