mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
23 lines
617 B
Bash
Executable File
23 lines
617 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ue
|
|
|
|
FILENAME=${1}
|
|
BENCHMARK_SIZE=${BENCHMARK_SIZE:-1000m}
|
|
|
|
if [ -f ${FILENAME} ] ; then
|
|
echo "File ${FILENAME} already exists!" >/dev/stderr
|
|
exit 1
|
|
fi
|
|
|
|
trap "test -f ${FILENAME} && rm -f ${FILENAME}" EXIT
|
|
|
|
fio --loops=5 --size=${BENCHMARK_SIZE} --filename=${FILENAME} \
|
|
--stonewall --ioengine=libaio --direct=1 \
|
|
--name=Seqread --bs=1m --rw=read \
|
|
--name=Seqwrite --bs=1m --rw=write \
|
|
--name=512Kread --bs=512k --rw=randread \
|
|
--name=512Kwrite --bs=512k --rw=randwrite \
|
|
--name=4kQD32read --bs=4k --iodepth=32 --rw=randread \
|
|
--name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite
|