code: func (cmd *BenchCommand) stopProfiling() {
  	if cpuprofile != nil {
  		pprof.StopCPUProfile()
  		cpuprofile.Close()
  		cpuprofile = nil
  	}
  
  	if memprofile != nil {
  		pprof.Lookup("heap").WriteTo(memprofile, 0)
  		memprofile.Close()
  		memprofile = nil
  	}
  
  	if blockprofile != nil {
  		pprof.Lookup("block").WriteTo(blockprofile, 0)
  		blockprofile.Close()
  		blockprofile = nil
  		runtime.SetBlockProfileRate(0)
  	}
  }
docs: // Stops all profiles.