Skip to content

Instantly share code, notes, and snippets.

@CrazyPython CrazyPython/
Last active Jun 29, 2016

What would you like to do?
pprof final script code for you googlers :) - executable will be stored in `./.executables/profiler/`; modify for yourself.
  1. download file
  2. chmod 777
  3. put a symlink to it in /usr/bin, or just put it in there (optional)
#!/usr/bin/env bash
# Licensed under the Unlicense. Full text at ( - CrazyPython
g++ -std=c++11 $1 -o ./.executables/profiler/$(basename $1 .cpp) -g -O -lprofiler
echo "Finished compiling + linking"
CPUPROFILE=$1.out ./.executables/profiler/$(basename $1 .cpp)
./.executables/profiler/$(basename $1 .cpp)
pprof ./.executables/profiler/$(basename $1 .cpp) $1.out
  1. <cpp file>
  2. You're greeted by the pprof interactive prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.