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
17 TEST_DESC
="UST tracer - Testing high events throughput"
20 TESTDIR
=$CURDIR/..
/..
/..
23 SESSION_NAME
="high-throughput"
24 EVENT_NAME
="tp:tptest"
27 source $TESTDIR/utils
/utils.sh
29 print_test_banner
"$TEST_DESC"
31 if [ ! -x "$CURDIR/$BIN_NAME" ]; then
32 BAIL_OUT
"No UST nevents binary detected."
35 TRACE_PATH
=$
(mktemp
-d)
37 # MUST set TESTDIR before calling those functions
43 create_lttng_session
$SESSION_NAME $TRACE_PATH
45 enable_ust_lttng_event
$SESSION_NAME $EVENT_NAME
46 start_lttng_tracing
$SESSION_NAME
48 for i
in `seq 1 $NR_APP`; do
49 .
/$CURDIR/$BIN_NAME & >/dev
/null
2>&1
52 while [ -n "$(pidof $BIN_NAME)" ]; do
55 pass
"Wait for application end"
57 stop_lttng_tracing
$SESSION_NAME
58 destroy_lttng_session
$SESSION_NAME
67 traced
=$
(babeltrace
$TRACE_PATH 2>/dev
/null |
wc -l)
68 babeltrace
$TRACE_PATH >/dev
/null
2>$TEMP_FILE_2
70 cat $TEMP_FILE_2 | cut
-f4 -d " " >$TEMP_FILE
75 let dropped
=$dropped+$line
78 let total
=$dropped+$traced
79 let wanted
=$NR_APP*1000000
81 if [ $wanted -ne $total ]; then
82 fail
"Trace validation"
83 diag
"Expected $wanted. Dropped $dropped. Recorded $traced. Total $total"
85 pass
"Trace validation"
86 diag
"Expected $wanted. Dropped $dropped. Recorded $traced. Total $total"
90 rm $TEMP_FILE $TEMP_FILE_2
This page took 0.033134 seconds and 5 git commands to generate.