Commit a4503fe2 authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

Add a quick benchmark. (Re. #6)

parent b38eac90
Loading
Loading
Loading
Loading

tests/test_benchmark

0 → 100755
+31 −0
Original line number Diff line number Diff line
#!/bin/sh

. ./common

LOOPS=3000

Start () {
	START="$(date +%s.%N)"
}

Stop () {
	SUFFIX="${1}"
	DURATION="$(echo "$(date +%s.%N) - ${START}" | bc)"
	printf "Took %.3fs %s\n" "${DURATION}" "${SUFFIX}"
}

Start
for X in $(seq "${LOOPS}")
do
	find fixtures -ls >/dev/null
done
Stop "without disorderfs"

Mount
Start
for X in $(seq "${LOOPS}")
do
	find target -ls >/dev/null
done
Stop "with disorderfs"
Unmount