code: func (p *Profiler) Stop() {
  	if p.profilingCPU {
  		pprof.StopCPUProfile()
  		p.profilingCPU = false
  	}
  
  	if p.listener != nil {
  		if err := p.listener.Close(); err != nil {
  			p.getLogger().Warningf("Failed to stop profile HTTP server: %s", err)
  		}
  		p.listener = nil
  	}
  
  	// Take one final snapshot.
  	p.DumpSnapshot()
  }
docs: // Stop stops the Profiler's operations.