Add missing scripts for ust notify and ust register
authorDavid Goulet <david.goulet@polymtl.ca>
Thu, 1 Sep 2011 20:48:27 +0000 (16:48 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Thu, 1 Sep 2011 20:49:29 +0000 (16:49 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
benchmark/hello [new file with mode: 0755]
benchmark/run-ust-notify.sh [new file with mode: 0755]
benchmark/run-ust-register.sh [new file with mode: 0755]

diff --git a/benchmark/hello b/benchmark/hello
new file mode 100755 (executable)
index 0000000..9f39805
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 (executable)
index 0000000..660492a
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
+#
+# 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 (executable)
index 0000000..88e70e0
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
+#
+# 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
This page took 0.0262 seconds and 4 git commands to generate.