From 520103aa3ac6ce72b9a3c6ef99c3431f9a459cfc Mon Sep 17 00:00:00 2001 From: Andreas Schenk <andreas_schenk@hms.harvard.edu> Date: Wed, 5 Dec 2012 18:11:17 -0500 Subject: [PATCH] added switch for profiling support to ost_config --- scripts/ost_config.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/ost_config.in b/scripts/ost_config.in index 1b84852e9..99dd87b0f 100644 --- a/scripts/ost_config.in +++ b/scripts/ost_config.in @@ -50,6 +50,18 @@ if [ -n "$DNG_ATTACH_VALGRIND" ]; then pyexec="`which valgrind`#--leak-check=full#$pyexec" fi +if [ -n "$DNG_PROFILE" ]; then + if [[ "$DNG_PROFILE" == "yep" ]]; then + echo "Profiling activated using yep" + pyexec="$pyexec#-m#yep#-v#--" + elif [[ "$DNG_PROFILE" == "cProfile" ]]; then + echo "Profiling activated using cProfile" + pyexec="$pyexec#-m#cProfile#-s#cumulative#--" + else + echo "Profiling deactivated due to unkown profiler" + fi +fi + set -o noglob -- GitLab