blob: cf7491a216bdba9dda456723bce83f44a6b2a32d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
set -euo pipefail
chunkdir="$1"
bin="$2"
cleanup()
{
echo "emptying $chunkdir" 1>&2
find "$chunkdir" -mindepth 1 -delete
}
cleanup
echo "running benchmarks for various sizes"
for n in 1 10 100 1000 10000 100000 1000000
do
echo "size $n" 1>&2
for prog in benchmark-null benchmark-index benchmark-store benchmark-indexedstore
do
/usr/bin/time --format "$prog $n %e" "$bin/$prog" "$chunkdir" "$n" 2>&1
cleanup
done
done | awk '{ printf "%-30s %10s %10s\n", $1, $2, $3 }'
|