X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=benchmark%2Frun-ust-notify.sh;h=971831817a85edd5165b483716bba9508c82e973;hb=0de5e1e503698d7d85f2a422094b820b83d38ec9;hp=660492a54da7fc8ee9d3c1c488cc7de8bd5abef3;hpb=94ebed1a52e46a2bc0d8538287300345387338f6;p=lttng-tools.git diff --git a/benchmark/run-ust-notify.sh b/benchmark/run-ust-notify.sh index 660492a54..971831817 100755 --- a/benchmark/run-ust-notify.sh +++ b/benchmark/run-ust-notify.sh @@ -17,26 +17,35 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -SESSIOND_BIN="ltt-sessiond" +SESSIOND_BIN="lttng-sessiond" RESULTS_PATH="/tmp/lttng-bench-results.txt" BASEDIR=`dirname $0` echo "Session daemon boot" -`BENCH_UST_NOTIFY=1 $BASEDIR/../ltt-sessiond/$SESSIOND_BIN --daemonize --quiet` -if [ $? -ne 0 ]; then +BENCH_UST_NOTIFY=1 $BASEDIR/../src/bin/lttng-sessiond/$SESSIOND_BIN -v >/dev/null 2>&1 & + +PID_SESSIOND=$! +if [ -z $PID_SESSIOND ]; then echo -e '\e[1;31mFAILED\e[0m' exit 1 else echo -e "\e[1;32mOK\e[0m" + echo "PID session daemon: $PID_SESSIOND" fi -PID_SESSIOND=`pidof lt-$SESSIOND_BIN` - -echo -e "\nResults will be available shortly in $RESULTS_PATH" -echo "" +# Session daemon need to boot up and run benchmark +echo -n "Waiting." +sleep 1 +echo -n "." +sleep 1 +echo "." +sleep 1 kill $PID_SESSIOND -tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null + +wait $PID_SESSIOND + +echo "Benchmarks done in $RESULTS_PATH" exit 0