3 # SPDX-License-Identifier: LGPL-2.1-only
7 source $TESTDIR/utils
/tap.sh
12 : ${NR_EVENTS:=7000000}
15 : ${TIME:="./$CURDIR/ptime"}
17 : ${PROG_NOTRACING:="./$CURDIR/bench1 $NR_CPUS $NR_EVENTS"}
18 : ${PROG_TRACING:="./$CURDIR/bench2 $NR_CPUS $NR_EVENTS"}
20 CMD_NOTRACING
="$TIME '$PROG_NOTRACING >/dev/null 2>&1'"
21 CMD_TRACING
="$TIME '$PROG_TRACING >/dev/null 2>&1'"
24 for i
in $
(seq $ITERS); do
25 echo 3 >/proc
/sys
/vm
/drop_caches
26 time_notrace
="$time_notrace+$(sh -c "$CMD_NOTRACING")"
29 lttng-sessiond
-d --no-kernel
31 lttng
-q enable-event
-u -a
35 for i
in $
(seq $ITERS); do
36 echo 3 >/proc
/sys
/vm
/drop_caches
37 time_trace
="$time_trace+$(sh -c "$CMD_TRACING")"
43 pass
"Trace benchmark"
44 diag
"Average tracing overhead per event is $(echo "scale
=6;( ($time_trace) - ($time_notrace) ) / $ITERS / $NR_EVENTS" | bc -l)s"
This page took 0.029508 seconds and 4 git commands to generate.