Forked from arsham/go_cpu_memory_profiling_benchmarks.sh
          
        
    
          Created
          April 29, 2021 05:25 
        
      - 
      
 - 
        
Save sangheee/abadfede115c2948136d7503c3a40c9c to your computer and use it in GitHub Desktop.  
    Go cpu and memory profiling benchmarks. #golang #benchmark
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FILENAME=$(basename $(pwd)); go test -run=^$ -bench=. -cpuprofile=cpu.out -benchmem -memprofile=mem.out && go tool pprof -pdf $FILENAME.test cpu.out > cpu.pdf && open cpu.pdf && go tool pprof -pdf $FILENAME.test mem.out > mem.pdf && open mem.pdf | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment