-
Notifications
You must be signed in to change notification settings - Fork 16
/
run_benchmark.sh
54 lines (49 loc) · 1.37 KB
/
run_benchmark.sh
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
################################################################################
# Script running spatial_index_benchmark programs
# https://github.com/mloskot/spatial_index_benchmark
################################################################################
# Copyright (C) 2013 Mateusz Loskot <[email protected]>
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
################################################################################
if [[ ! -d $1 ]]; then
echo "Cannot find '$1' build directory"
exit 1
fi
RDIR="$PWD"
if [[ -d $2 ]]; then
RDIR="$2"
fi
BDIR="$1"
LOGEXT="dat"
#
# Benchmark iterative loading (takes long time, skipped on Travis CI)
#
if [[ "$TRAVIS" != "true" ]] ; then
for variant in linear quadratic rstar quadtree
do
for benchmark in `find $BDIR -type f -name "*${variant}*" | sort`
do
name=`basename ${benchmark}`
echo "$name"
${benchmark} > ${RDIR}/${name}.${LOGEXT}
done;
done;
fi
#
# Benchmark bulk loading
#
for variant in linear quadratic rstar
do
for benchmark in `find $BDIR -type f -name "*${variant}_blk" | sort`
do
name=`basename ${benchmark}`
echo "$name"
${benchmark} > ${RDIR}/${name}.${LOGEXT}
done;
done;
cd ./results
gnuplot ./plot_results.plt