On Wed, Oct 28, 2020 at 12:00:03PM +0800, Lu Kaiyi wrote:
[why] need to test write, rewrite, read, reread, random write, random read for different block_size.
[How] add judement for variable $block_size to execute iozone command with specificed parameter.
Signed-off-by: Lu Kaiyi 2392863668@qq.com
tests/iozone | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/tests/iozone b/tests/iozone index 3095ce80..e69991fa 100755 --- a/tests/iozone +++ b/tests/iozone @@ -1,4 +1,9 @@ #!/bin/sh +# - block_size +# - file_size +# - write_rewrite +# - read_reread +# - random_read_write
## IOzone is a filesystem benchmark tool. The benchmark generates ## and measures a variety of file operations. @@ -7,7 +12,17 @@
for mnt in $mount_points do
- cmd="iozone -a -f $mnt/iozonetest"
- cmd="iozone"
- if [ -n "$block_size" ]; then
cmd += " -r $block_size"
[ -n "$file_size" ] && cmd += " -s $file_size"
[ -n "$write_rewrite" ] && cmd += " -i $write_rewrite"
[ -n "$read_reread" ] && cmd += " -i $read_reread"
[ -n "$random_read_write" ] && cmd += " -i $random_read_write"
perhaps you should keep "&&" aligned. Thanks, Liushaofei
- else
cmd += " -a"
- fi
- cmd += " -f $mnt/iozonetest" log_echo "$cmd &" $cmd > $TMP/iozone-$i & i=$((i+1))
-- 2.23.0