- download file
chmod 777 profile.sh
- put a symlink to it in /usr/bin, or just put it in there (optional)
Last active
June 29, 2016 20:18
-
-
Save CrazyPython/359528e67531e895e2ed945ad2e8f5c4 to your computer and use it in GitHub Desktop.
pprof final script code for you googlers :) - executable will be stored in `./.executables/profiler/`; modify for yourself.
This file contains 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
#!/usr/bin/env bash | |
# Licensed under the Unlicense. Full text at (http://unlicense.org/) - 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment