Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

set path=%path%;c:\cygwin\bin #!/bin/bash IFS=$'\n' if

then sourcefile=$1

outfile="out.pdf"
if [[ $# -ge 2 ]]
then
	outfile=$2
fi

echo "=== Run the python program ======"
echo "python3 -m cProfile -o python.prof \"$sourcefile\""
python3 -m cProfile -o python.prof "$sourcefile"
echo

echo "=== Format the profiling results ======"
echo "gprof2dot -fpstats python.prof -o gprof.dot"
gprof2dot -fpstats python.prof -o gprof.dot
echo

echo "=== Create profiling graph ======"
echo "dot -T pdf gprof.dot -o \"$outfile\""
dot -T pdf gprof.dot -o "$outfile"

else echo "You've got to tell me which file to profile" fi