Deprecate enable/disable-consumer
[lttng-tools.git] / tests / ust / high-throughput / run
index a97d2756664550795e38a25c6f87210a0725d5ae..dff5fdd4978b437ac1c76f9d3a97868dc8a39133 100755 (executable)
@@ -14,6 +14,7 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this library; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+TEST_DESC="UST tracer - Testing high events throughput"
 
 CURDIR=$(dirname $0)/
 TESTDIR=$CURDIR/../..
@@ -24,9 +25,7 @@ EVENT_NAME="tp:tptest"
 
 source $TESTDIR/utils.sh
 
-echo -e "\n-------------------------------------------"
-echo -e "UST tracer - Testing high events throughput"
-echo -e "-------------------------------------------"
+print_test_banner "$TEST_DESC"
 
 if [ ! -x "$CURDIR/$BIN_NAME" ]; then
        echo -e "No UST nevents binary detected. Passing."
@@ -37,24 +36,28 @@ TRACE_PATH=$(mktemp -d)
 
 # MUST set TESTDIR before calling those functions
 
-start_sessiond
+start_lttng_sessiond
 
 create_lttng_session $SESSION_NAME $TRACE_PATH
 
 enable_ust_lttng_event $SESSION_NAME $EVENT_NAME
-start_tracing $SESSION_NAME
+start_lttng_tracing $SESSION_NAME
 
 for i in `seq 1 $NR_ITER`; do
        ./$CURDIR/$BIN_NAME & >/dev/null 2>&1
 done
 
-echo "Waiting for all tracing to settle"
-sleep 5
+echo "Waiting for applications to end"
+while [ -n "$(pidof $BIN_NAME)" ]; do
+       echo -n "."
+       sleep 0.5
+done
+echo ""
 
-stop_tracing $SESSION_NAME
+stop_lttng_tracing $SESSION_NAME
 destroy_lttng_session $SESSION_NAME
 
-stop_sessiond
+stop_lttng_sessiond
 
 # Validate test
 
@@ -77,11 +80,11 @@ let wanted=$NR_ITER*1000000
 
 if [ $wanted -ne $total ]; then
        echo -n "Expected $wanted. Dropped $dropped. Recorded $traced. Total $total... "
-       echo -e "\e[1;31mFAILED\e[0m"
+       print_fail
        out=1
 else
        echo -n "Expected $wanted. Dropped $dropped. Recorded $traced. Total $total... "
-       echo -e "\e[1;32mOK\e[0m"
+       print_ok
        out=0
 fi
 
This page took 0.025732 seconds and 5 git commands to generate.