code: func (h *HandlerT) StartCPUProfile(file string) error {
  	h.mu.Lock()
  	defer h.mu.Unlock()
  	if h.cpuW != nil {
  		return errors.New("CPU profiling already in progress")
  	}
  	f, err := os.Create(expandHome(file))
  	if err != nil {
  		return err
  	}
  	if err := pprof.StartCPUProfile(f); err != nil {
  		f.Close()
  		return err
  	}
  	h.cpuW = f
  	h.cpuFile = file
  	log.Info("CPU profiling started", "dump", h.cpuFile)
  	return nil
  }
docs: // StartCPUProfile turns on CPU profiling, writing to the given file.