]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
Add performance numbers to appropriate block tests
authorJens Axboe <axboe@fb.com>
Tue, 9 May 2017 20:35:13 +0000 (14:35 -0600)
committerOmar Sandoval <osandov@fb.com>
Wed, 10 May 2017 02:55:20 +0000 (19:55 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
tests/block/003
tests/block/004
tests/block/005
tests/block/007

index 8db83b022f18b5dee048391c6f1e1d5ac9be7600..f89f9ead5d7c5293facb051e3edc2f67c3f5d521 100755 (executable)
@@ -30,9 +30,14 @@ prepare_device() {
 test_device() {
        echo "Running ${TEST_NAME}"
 
-       fio --bsrange=4k-4g --rw=randtrim --norandommap \
-               --name=discards --filename="$TEST_DEV" --runtime=10s \
-               --time_based=1 >>"$FULL"
+       fio --output-format=terse --terse-version=4 --bsrange=4k-4g \
+               --rw=randtrim --norandommap --name=discards \
+               --filename="$TEST_DEV" --runtime=10s --time_based=1 >>"$FULL"
+
+       TERSE_VER=$(cat $FULL | cut -d ';' -f1)
+       if [[ "$TERSE_VER" -eq "4" ]]; then
+               TEST_RUN[iops]=$(cat $FULL | cut -d ';' -f90)
+       fi
 
        echo "Test complete"
 }
index 8f44c7cda0b23aed5cf186f740f4053587c127bc..0b270d1f7ee7ff6c52ad85577a1091581abdaf97 100755 (executable)
@@ -26,9 +26,14 @@ prepare() {
 test_device() {
        echo "Running ${TEST_NAME}"
 
-       fio --bs=4k --rw=randwrite --norandommap --fsync=1 \
-               --number_ios=256 --numjobs=64 --name=flushes \
-               --filename="$TEST_DEV" >>"$FULL"
+       fio --output-format=terse --bs=4k --rw=randwrite --norandommap \
+               --fsync=1 --number_ios=256 --numjobs=64 --name=flushes \
+               --group_reporting=1 --filename="$TEST_DEV" >>"$FULL"
+
+       TERSE_VER=$(cat $FULL | cut -d ';' -f1)
+       if [[ "$TERSE_VER" -eq "3" ]]; then
+               TEST_RUN[iops]=$(cat $FULL | cut -d ';' -f49)
+       fi
 
        echo "Test complete"
 }
index 4ae27614009cec4e4366adb9cb0c6c8f45e9952d..19e1dee75f22b96c570af7b953e769c6bfc702d7 100755 (executable)
@@ -35,9 +35,9 @@ test_device() {
        fi
 
        # start fio job
-       fio --bs=4k --rw=randread --norandommap --name=reads \
-               --filename="$TEST_DEV" --size="$size" --numjobs=8 --direct=1 \
-               >>"$FULL" &
+       fio --output-format=terse --bs=4k --rw=randread --norandommap \
+                --name=reads --filename="$TEST_DEV" --size="$size" \
+               --group_reporting=1 --numjobs=8 --direct=1 >>"$FULL" &
 
        # while job is running, switch between schedulers
        while kill -0 $! 2>/dev/null; do
@@ -46,5 +46,10 @@ test_device() {
                sleep .2
        done
 
+       TERSE_VER=$(cat $FULL | cut -d ';' -f1)
+       if [[ "$TERSE_VER" -eq "3" ]]; then
+               TEST_RUN[iops]=$(cat $FULL | cut -d ';' -f8)
+       fi
+
        echo "Test complete"
 }
index dee0325eda374d6ec8db35cf3dc296c7fac5af38..831282a686bd0ee48a06a010d49bec45b6545588 100755 (executable)
@@ -39,23 +39,43 @@ run_fio_job() {
        fio --bs=4k --rw=randread --norandommap --name=reads \
                --filename="$TEST_DEV" --size="$size" --direct=1 \
                --ioengine=pvsync2 --hipri=1 >>"$FULL"
+
+       OUT=$(fio --output-format=terse --bs=4k --rw=randread --norandommap \
+               --name=reads --filename="$TEST_DEV" --size="$size" --direct=1 \
+               --ioengine=pvsync2 --hipri=1)
+       echo $OUT >> "$FULL"
+
+       TERSE_VER=$(echo $OUT | cut -d ';' -f1)
+       if [[ "$TERSE_VER" -eq "3" ]]; then
+               iops=$(echo $OUT | cut -d ';' -f8)
+       else
+               iops=0
+       fi
 }
 
 test_device() {
        echo "Running ${TEST_NAME}"
 
+       # no polling, run job
+       _test_dev_set_io_poll 0
+       run_fio_job
+       TEST_RUN[iops]=$iops
+
        # turn on polling, switch to classic, run job
        _test_dev_set_io_poll 1
        _test_dev_set_io_poll_delay -1
        run_fio_job
+       TEST_RUN[poll iops]=$iops
 
        # switch to auto-hybrid polling, run job
        _test_dev_set_io_poll_delay 0
        run_fio_job
+       TEST_RUN[hybrid poll iops]=$iops
 
        # switch to explicit delay polling, run job
        _test_dev_set_io_poll_delay 4
        run_fio_job
+       TEST_RUN[fixed poll iops]=$iops
 
        echo "Test complete"
 }