| 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright (C) 2010 David Goulet <david.goulet@polymtl.ca> |
| 4 | # Copyright (C) 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 5 | # |
| 6 | # This library is free software; you can redistribute it and/or |
| 7 | # modify it under the terms of the GNU Lesser General Public |
| 8 | # License as published by the Free Software Foundation; either |
| 9 | # version 2.1 of the License, or (at your option) any later version. |
| 10 | # |
| 11 | # This library is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | # Lesser General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU Lesser General Public |
| 17 | # License along with this library; if not, write to the Free Software |
| 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | |
| 20 | # UST scalability test |
| 21 | |
| 22 | REPORT=/tmp/testreport |
| 23 | |
| 24 | rm $REPORT |
| 25 | |
| 26 | echo "Userspace tracing scalability test report" |tee >> $REPORT |
| 27 | |
| 28 | for nr_threads in 1 2 4 8; do |
| 29 | echo "" | tee >> $REPORT |
| 30 | echo Number of threads: $nr_threads | tee >> $REPORT |
| 31 | echo "* Baseline" | tee >> $REPORT |
| 32 | |
| 33 | sync |
| 34 | /usr/bin/time -o /tmp/testlog ./.libs/tracepoint_benchmark ${nr_threads} |
| 35 | cat /tmp/testlog >> $REPORT |
| 36 | |
| 37 | #flight recorder, don't record trace to disk. |
| 38 | export UST_AUTOCOLLECT=0 |
| 39 | export UST_OVERWRITE=1 |
| 40 | export UST_SUBBUF_NUM=16 |
| 41 | #default buffer size is 4k |
| 42 | |
| 43 | #Collect traces to disk |
| 44 | #export UST_AUTOCOLLECT=1 |
| 45 | #export UST_OVERWRITE=0 |
| 46 | #export UST_SUBBUF_NUM=16 |
| 47 | #default buffer size is 4k |
| 48 | |
| 49 | echo "* Flight recorder" | tee >> $REPORT |
| 50 | sync |
| 51 | /usr/bin/time -o /tmp/testlog usttrace ./.libs/tracepoint_benchmark ${nr_threads} |
| 52 | cat /tmp/testlog >> $REPORT |
| 53 | done |
| 54 | |
| 55 | cat /tmp/testreport |