Files
splash/tools/profile_flamegraph.sh
Jérémie Soria 7cdac19b91 Ease-of-use for performance profiler flamegraph generation.
Added conditional profiling of render loop and texture upload threads.
2017-11-24 10:59:17 -05:00

29 lines
535 B
Bash
Executable File

#!/bin/bash
usage(){
echo Usage: profile_flamegraph.sh [PROFILING_DATA_FILE]
echo Mandatory argument:
echo -e "\tPROFILING_DATA_FILE: path of the file containing the flamegraph-formatted profiling data"
exit 1
}
if [ $# -ne 1 ]
then
usage
fi
if [ -w $(dirname $1) ]
then
if [ -e "$1" ]
then
$(dirname $0)/../external/flamegraph/flamegraph.pl $1 > $1.svg && firefox $1.svg
else
echo "Could not find profiling data file $1."
exit 1
fi
else
echo "Directory $(dirname $1) is not writable."
exit 1
fi