[why]
need to test write, rewrite, read, reread, random write,
random read for 4g size and different block_size.
[How]
add judement for variable $block_size to execute iozone
command with specificed parameter.
Signed-off-by: Lu Kaiyi <2392863668(a)qq.com>
---
tests/iozone | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/iozone b/tests/iozone
index 3095ce80..c5f29d74 100755
--- a/tests/iozone
+++ b/tests/iozone
@@ -1,4 +1,5 @@
#!/bin/sh
+# - block_size
## IOzone is a filesystem benchmark tool. The benchmark generates
## and measures a variety of file operations.
@@ -7,7 +8,11 @@
for mnt in $mount_points
do
- cmd="iozone -a -f $mnt/iozonetest"
+ if [ -n "$block_size" ]; then
+ cmd="iozone -r $block_size -s 4g -i 0 -i 1 -i 2 -f $mnt/iozonetest"
+ else
+ cmd="iozone -a -f $mnt/iozonetest"
+ fi
log_echo "$cmd &"
$cmd > $TMP/iozone-$i &
i=$((i+1))
--
2.23.0