9301162730f25bd980e724d65a25d2d9922cc989
3 # UST vs SystemTap scalability test
4 # This script can run 4 different tests :
5 # - UST in flight recorder mode
6 # - UST writing the trace to disk
7 # - SystemTap in flight recorder mode
8 # - SystemTap writing the trace to disk
10 # You need to be root to run the SystemTap tests because of the rmmod
12 BINARY
=tracepoint_benchmark
13 REPORT
=/tmp
/testreport
18 STAPTMP
=/tmp
/stapconsole
19 STAPPROBE
=testutrace.stp
21 rm $REPORT 2>/dev
/null
23 ust_flight_recorder
() {
24 # flight recorder, don't record trace to disk.
25 # default buffer size is 4k
26 echo -n "* UST Flight recorder : " |
tee >> $REPORT
27 export UST_AUTOCOLLECT
=0
28 export UST_OVERWRITE
=1
29 export UST_SUBBUF_NUM
=16
34 # Collect traces to disk
35 # default buffer size is 4k
36 echo -n "* UST Write to disk : " |
tee >> $REPORT
37 export UST_AUTOCOLLECT
=1
38 export UST_OVERWRITE
=0
39 export UST_SUBBUF_NUM
=16
43 stap_flight_recorder
() {
44 echo -n "* SystemTap Flight recorder : " |
tee >> $REPORT
46 $STAP $STAPPROBE -F -m $BINARY
50 echo -n "* SystemTap Write to disk : " |
tee >> $REPORT
52 $STAP $STAPPROBE -o $STAPTMP -m $BINARY &
56 echo "Userspace tracing scalability test report" |
tee >> $REPORT
59 TEST
=ust_flight_recorder
65 TEST
=stap_flight_recorder
66 CLEANUP
="rmmod $BINARY 2>/dev/null"
70 CLEANUP
="killall stapio 2>/dev/null"
73 echo "Usage : $0 {ust_flight_recorder|ust_disk|stap_flight_recorder|stap_disk}"
78 for nr_threads
in 1 2 4 8; do
79 echo "" |
tee >> $REPORT
80 echo Number of threads
: $nr_threads |
tee >> $REPORT
81 echo -n "* Baseline : " |
tee >> $REPORT
86 /usr
/bin
/time -f "%E" -o $TMPLOG .
/$BINARY ${nr_threads}
87 cat $TMPLOG >> $REPORT
92 /usr
/bin
/time -f "%E" -o $TMPLOG $WRAPPER .
/$BINARY ${nr_threads}
93 cat $TMPLOG >> $REPORT
This page took 0.031582 seconds and 3 git commands to generate.