Skip to content
Snippets Groups Projects
Commit 6fdb226c authored by Zach Brown's avatar Zach Brown
Browse files

- record 'readprofile' profiles if they are available

- record all the test commands that are run
parent 6ef02e67
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,9 @@ declare -a cleanup_mounts ...@@ -22,6 +22,9 @@ declare -a cleanup_mounts
cur_y="0" cur_y="0"
# a global which funcs use to get at the blocks[] array # a global which funcs use to get at the blocks[] array
last_block=-1 last_block=-1
# prefix to run oprofile or readprofile
oprofile=""
readprofile=""
# defaults for some options: # defaults for some options:
min_threads=1 min_threads=1
...@@ -598,11 +601,13 @@ test_one() { ...@@ -598,11 +601,13 @@ test_one() {
done done
$oprofile opcontrol --reset $oprofile opcontrol --reset
$readprofile -r
# start all the tests. each returns a pid to wait on # start all the tests. each returns a pid to wait on
pids="" pids=""
for i in `seq 0 $last_block`; do for i in `seq 0 $last_block`; do
local cmd=`${test}_start $threads $iosize $wor $i` local cmd=`${test}_start $threads $iosize $wor $i`
echo "$cmd" >> $tmpdir/commands
$cmd > $tmpdir/$i 2>&1 & $cmd > $tmpdir/$i 2>&1 &
local pid=$! local pid=$!
pids="$pids $pid" pids="$pids $pid"
...@@ -628,11 +633,15 @@ test_one() { ...@@ -628,11 +633,15 @@ test_one() {
pid_has_stopped $pid pid_has_stopped $pid
done done
$readprofile | sort -rn > $tmpdir/readprofile
$oprofile opcontrol --shutdown $oprofile opcontrol --shutdown
$oprofile opreport > $tmpdir/oprofile $oprofile opreport > $tmpdir/oprofile
echo >> $tmpdir/oprofile echo >> $tmpdir/oprofile
$oprofile opreport -c -l | head -20 >> $tmpdir/oprofile $oprofile opreport -c -l | head -20 >> $tmpdir/oprofile
save_output $tmpdir/oprofile $opref.oprofile save_output $tmpdir/oprofile $opref.oprofile
save_output $tmpdir/readprofile $opref.readprofile
# collect the results of vmstat and iostat # collect the results of vmstat and iostat
cpu=$(mean_stddev $(awk \ cpu=$(mean_stddev $(awk \
...@@ -792,6 +801,18 @@ else ...@@ -792,6 +801,18 @@ else
oprofile=": " oprofile=": "
fi fi
if which readprofile; then
map="/boot/System.map-`uname -r`"
if [ -f /proc/profile -a -f "$map" ]; then
echo generating profiles with 'readprofile'
readprofile="readprofile -m $map"
fi
fi
if [ -z "$readprofile" ]; then
echo not using readprofile
readprofile=": "
fi
[ $min_threads -gt $max_threads ] && \ [ $min_threads -gt $max_threads ] && \
die "min threads $min_threads must be <= min_threads $min_threads" die "min threads $min_threads must be <= min_threads $min_threads"
...@@ -832,6 +853,8 @@ for t in $run_tests; do ...@@ -832,6 +853,8 @@ for t in $run_tests; do
test_results="$test_results $t" test_results="$test_results $t"
done done
save_output $tmpdir/commands commands
[ ! -z "$test_results" ] && ( [ ! -z "$test_results" ] && (
echo echo
echo "T = number of concurrent threads per device" echo "T = number of concurrent threads per device"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment