###
### Measure latency of random direct io_uring randreads using a single CPU on the system
###
export MMTESTS="fio"

export TESTDISK_NULLB_DEVICE=yes
export TESTDISK_NOMOUNT=true

export FIO_TEST_TYPE=block

# List of monitors
export RUN_MONITOR=yes
export MONITORS_ALWAYS=
export MONITORS_GZIP="proc-vmstat top iotop"
export MONITORS_WITH_LATENCY="vmstat iostat"
export MONITOR_UPDATE_FREQUENCY=10
export MMTEST_ITERATIONS=3

# fio
JOBFILE="/tmp/fio-jobfile-$$"

# Keep ioengine explicit here instead of the jobfile.  Some ioengine
# options must be listed after the ioengine parameter.
export FIO_CMD_OPTIONS="$JOBFILE --ioengine=io_uring "

cat >$JOBFILE <<END
[global]
direct=1
iodepth=128

runtime=90
blocksize=4k
invalidate=1
time_based
ramp_time=5
log_avg_msec=10
group_reporting=1
cpumask=1

[write]
numjobs=1
readwrite=randread
END
