projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs Yet more tests for quick tests.
[yaffs2.git]
/
linux-tests
/
plot_data.sh
diff --git
a/linux-tests/plot_data.sh
b/linux-tests/plot_data.sh
index 6713f722aa5a972dd238021fa6f7b71b8bbe2f06..dcc1de3c951f8ee68fec238bfae663eb0e9854bf 100755
(executable)
--- a/
linux-tests/plot_data.sh
+++ b/
linux-tests/plot_data.sh
@@
-7,6
+7,8
@@
log_file=data
gather_delay=1
log_file=data
gather_delay=1
+done_file=plot_done
+
# Plot settings
trunc_file=trunc_data
plot_samples=1000
# Plot settings
trunc_file=trunc_data
plot_samples=1000
@@
-14,17
+16,19
@@
plot_delay=2
+
+
# Gathering task
gather_data() {
i=0;
rm -f $log_file
# Gathering task
gather_data() {
i=0;
rm -f $log_file
-while
true
; do
-str=$(cat /proc/yaffs_
debug
)
+while
[ ! -e $done_file ]
; do
+str=$(cat /proc/yaffs_
stats
)
echo "$i, $str"
echo "$i, $str" >> $log_file
echo "$i, $str"
echo "$i, $str" >> $log_file
-let i=$i+1
+i=$(($i+1))
sleep $gather_delay
done
}
sleep $gather_delay
done
}
@@
-40,11
+44,14
@@
tail -$plot_samples $log_file > $trunc_file
plot_str=" plot '$trunc_file' using 1:3 with linespoints title 'free', '' using 1:4 with linespoints title 'erased'"
plot_str=" plot '$trunc_file' using 1:3 with linespoints title 'free', '' using 1:4 with linespoints title 'erased'"
-echo "set title 'yaffs free space and erased space'"
+echo "set title 'yaffs free space vs erased space'"
+echo "set xlabel 'seconds'"
+echo "set ylabel 'chunks'"
+
echo $plot_str
echo $plot_str
-while
true
; do
+while
[ ! -e $done_file ]
; do
sleep $plot_delay
tail -$plot_samples $log_file > $trunc_file
echo replot
sleep $plot_delay
tail -$plot_samples $log_file > $trunc_file
echo replot
@@
-52,9
+59,15
@@
done
}
}
+rm -f $done_file
+trap "touch $done_file" INT
echo "Start gathering task in background"
gather_data &
echo "Run plotting task"
drive_gnuplot | gnuplot
echo "Start gathering task in background"
gather_data &
echo "Run plotting task"
drive_gnuplot | gnuplot
+wait
+
+echo "All done"
+