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

- collect basic oprofile results when it is available

- make the output directory if it doesn't exist
- add a forgotten item to the key
parent 29e3b785
No related branches found
No related tags found
No related merge requests found
...@@ -578,6 +578,8 @@ test_one() { ...@@ -578,6 +578,8 @@ test_one() {
echo $test with $threads threads echo $test with $threads threads
$oprofile opcontrol --start
# start up vmstat and record its pid # start up vmstat and record its pid
nice -19 vmstat 1 > $vmstat_log 2>&1 & nice -19 vmstat 1 > $vmstat_log 2>&1 &
[ $? = 0 ] || die "vmstat failed" [ $? = 0 ] || die "vmstat failed"
...@@ -594,6 +596,8 @@ test_one() { ...@@ -594,6 +596,8 @@ test_one() {
iostat_pids[$i]=$pid iostat_pids[$i]=$pid
done done
$oprofile opcontrol --reset
# 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
...@@ -623,6 +627,12 @@ test_one() { ...@@ -623,6 +627,12 @@ test_one() {
pid_has_stopped $pid pid_has_stopped $pid
done done
$oprofile opcontrol --shutdown
$oprofile opreport > $tmpdir/oprofile
echo >> $tmpdir/oprofile
$oprofile opreport -c -l | head -20 >> $tmpdir/oprofile
save_output $tmpdir/oprofile $opref.oprofile
# collect the results of vmstat and iostat # collect the results of vmstat and iostat
cpu=$(mean_stddev $(awk \ cpu=$(mean_stddev $(awk \
'(NR > 3 && NF == 16 && $16 != "id" ) \ '(NR > 3 && NF == 16 && $16 != "id" ) \
...@@ -756,8 +766,9 @@ if [ -z "$io_len" ]; then ...@@ -756,8 +766,9 @@ if [ -z "$io_len" ]; then
fi fi
if [ ! -z "$output_dir" ]; then if [ ! -z "$output_dir" ]; then
[ ! -e "$output_dir" ] && "output dir $output_dir doesn't exist" [ ! -e "$output_dir" ] && mkdir -p "$output_dir" || die \
[ ! -d "$output_dir" ] && "output dir $output_dir isn't a directory" "error creating $output_dir"
[ ! -d "$output_dir" ] && die "$output_dir isn't a directory"
fi fi
block=`echo $block | sed -e 's/,/ /g'` block=`echo $block | sed -e 's/,/ /g'`
...@@ -771,6 +782,14 @@ for t in $run_tests; do ...@@ -771,6 +782,14 @@ for t in $run_tests; do
fi fi
done done
if which opcontrol; then
echo generating oprofile results
oprofile=""
else
echo not using oprofile
oprofile=": "
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"
...@@ -816,6 +835,7 @@ done ...@@ -816,6 +835,7 @@ done
echo "T = number of concurrent threads per device" echo "T = number of concurrent threads per device"
echo "L = base io operation length, in KB" echo "L = base io operation length, in KB"
echo "m = IO method: read, write, or over-write" echo "m = IO method: read, write, or over-write"
echo "A = aggregate throughput from all devices"
echo "C = percentage CPU used, both user and system" echo "C = percentage CPU used, both user and system"
echo "MB/s = per-device throughput" echo "MB/s = per-device throughput"
echo "rR = read requests issued to the device per second" echo "rR = read requests issued to the device per second"
......
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