3 # Copyright (C) - 2012 David Goulet <dgoulet@efficios.com>
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation; version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this library; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 SESSION_NAME
="high-throughput"
23 EVENT_NAME
="tp:tptest"
25 source $TESTDIR/utils.sh
27 echo -e "\n-------------------------------------------"
28 echo -e "UST tracer - Testing high events throughput"
29 echo -e "-------------------------------------------"
31 if [ ! -e "$CURDIR/$BIN_NAME" ]; then
32 echo -e "No UST nevents binary detected. Passing."
36 TRACE_PATH
=$
(mktemp
-d)
38 # MUST set TESTDIR before calling those functions
42 create_lttng_session
$SESSION_NAME $TRACE_PATH
44 enable_ust_lttng_event
$SESSION_NAME $EVENT_NAME
45 start_tracing
$SESSION_NAME
47 for i
in `seq 1 $NR_ITER`; do
48 .
/$CURDIR/$BIN_NAME & >/dev
/null
2>&1
51 echo "Waiting for all tracing to settle"
54 stop_tracing
$SESSION_NAME
55 destroy_lttng_session
$SESSION_NAME
64 traced
=$
(babeltrace
$TRACE_PATH 2>/dev
/null |
wc -l)
65 babeltrace
$TRACE_PATH >/dev
/null
2>$TEMP_FILE_2
67 cat $TEMP_FILE_2 | cut
-f4 -d " " >$TEMP_FILE
72 let dropped
=$dropped+$line
75 let total
=$dropped+$traced
76 let wanted
=$NR_ITER*1000000
78 if [ $wanted -ne $total ]; then
79 echo -n "Expected $wanted. Dropped $dropped. Recorded $traced. Total $total... "
80 echo -e "\e[1;31mFAILED\e[0m"
83 echo -n "Expected $wanted. Dropped $dropped. Recorded $traced. Total $total... "
84 echo -e "\e[1;32mOK\e[0m"
89 rm $TEMP_FILE $TEMP_FILE_2
This page took 0.03498 seconds and 4 git commands to generate.