From: David Goulet Date: Thu, 1 Sep 2011 20:48:27 +0000 (-0400) Subject: Add missing scripts for ust notify and ust register X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=94ebed1a52e46a2bc0d8538287300345387338f6;p=lttng-tools.git Add missing scripts for ust notify and ust register Signed-off-by: David Goulet --- diff --git a/benchmark/hello b/benchmark/hello new file mode 100755 index 000000000..9f39805ed Binary files /dev/null and b/benchmark/hello differ diff --git a/benchmark/run-ust-notify.sh b/benchmark/run-ust-notify.sh new file mode 100755 index 000000000..660492a54 --- /dev/null +++ b/benchmark/run-ust-notify.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# Copyright (C) 2011 - David Goulet +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; only version 2 +# of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +SESSIOND_BIN="ltt-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 + echo -e '\e[1;31mFAILED\e[0m' + exit 1 +else + echo -e "\e[1;32mOK\e[0m" +fi + +PID_SESSIOND=`pidof lt-$SESSIOND_BIN` + +echo -e "\nResults will be available shortly in $RESULTS_PATH" +echo "" + +kill $PID_SESSIOND +tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null + +exit 0 diff --git a/benchmark/run-ust-register.sh b/benchmark/run-ust-register.sh new file mode 100755 index 000000000..88e70e0a0 --- /dev/null +++ b/benchmark/run-ust-register.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Copyright (C) 2011 - David Goulet +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; only version 2 +# of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +SESSIOND_BIN="ltt-sessiond" +RESULTS_PATH="/tmp/lttng-bench-results.txt" +BASEDIR=`dirname $0` + +echo "Session daemon boot process benchmark" + +`BENCH_UST_REGISTER=1 $BASEDIR/../ltt-sessiond/$SESSIOND_BIN --daemonize --quiet` +if [ $? -ne 0 ]; then + echo -e '\e[1;31mFAILED\e[0m' + exit 1 +else + echo -e "\e[1;32mOK\e[0m" +fi + +PID_SESSIOND=`pidof lt-$SESSIOND_BIN` + +# Wait for sessiond to settle +sleep 2 + +# Start libust instrumented application to register. +UST_AUTOPROBE=1 UST_TRACE=1 ./$BASEDIR/hello + +echo -e "\nResults will be available shortly in $RESULTS_PATH" +echo "" + +kill $PID_SESSIOND +tail -F $RESULTS_PATH --pid $PID_SESSIOND 2>/dev/null + +exit 0