# You need to be root to run the SystemTap tests because of the rmmod
-BINARY=tracepoint_benchmark
+BINARY=./tracepoint_benchmark
+MODNAME=tpbench
REPORT=/tmp/testreport
TMPLOG=/tmp/testlog
WRAPPER=""
stap_flight_recorder() {
echo -n "* SystemTap Flight recorder : " | tee >> $REPORT
WRAPPER=""
- $STAP $STAPPROBE -F -m $BINARY
+ $STAP $STAPPROBE -F -m $MODNAME
}
stap_disk() {
echo -n "* SystemTap Write to disk : " | tee >> $REPORT
WRAPPER=""
- $STAP $STAPPROBE -o $STAPTMP -m $BINARY &
+ $STAP $STAPPROBE -o $STAPTMP -m $MODNAME &
sleep 5
}
;;
stap_flight_recorder)
TEST=stap_flight_recorder
- CLEANUP="rmmod $BINARY 2>/dev/null"
+ CLEANUP="rmmod $MODNAME 2>/dev/null"
;;
stap_disk)
TEST=stap_disk
echo Number of threads: $nr_threads | tee >> $REPORT
echo -n "* Baseline : " | tee >> $REPORT
- $CLEANUP
+ eval $CLEANUP
sync
- /usr/bin/time -f "%E" -o $TMPLOG ./$BINARY ${nr_threads}
+ /usr/bin/time -f "%E" -o $TMPLOG $BINARY ${nr_threads}
cat $TMPLOG >> $REPORT
$TEST
sync
- /usr/bin/time -f "%E" -o $TMPLOG $WRAPPER ./$BINARY ${nr_threads}
+ /usr/bin/time -f "%E" -o $TMPLOG $WRAPPER $BINARY ${nr_threads}
cat $TMPLOG >> $REPORT
done