rm -rf build
meson setup build
Note: you need boost installed for the benchmark tests
meson configure build -Dtest=true
meson configure build -Doptimization=2
meson test -C build -v
meson test -C build --benchmark -v
meson configure build -Doptimization=0
meson configure build -Doptimization=2
meson configure build -Doptimization=3
# boost (for boost rtree)
sudo apt install libboost-all-dev
meson compile -Cbuild
opt=$(meson configure build | grep optimization | head -1 | awk '{print $2}') && echo "optimization $opt"
echo "Running benchmarks for -O${opt}"
csv="benchmark-init-O${opt}.csv"
png="benchmark-init-O${opt}.png"
./build/test/benchmark/benchmarks --benchmark_filter=init --benchmark_format=csv | tee "$csv"
python ./test/benchmark/plot.py -f "$csv" --output "doc/$png" --title "init: inserting points from a NxN grid" --xlabel "N" --ylabel "time (ms)"
csv="benchmark-search-O${opt}.csv"
png="benchmark-search-O${opt}.png"
./build/test/benchmark/benchmarks --benchmark_filter=search --benchmark_format=csv | tee "$csv"
python ./test/benchmark/plot.py -f "$csv" --output "doc/$png" --title "search (5x5 area)" --xlabel "N" --ylabel "time (ms)"
csv="benchmark-copy-O${opt}.csv"
png="benchmark-copy-O${opt}.png"
./build/test/benchmark/benchmarks --benchmark_filter=copy --benchmark_format=csv | tee "$csv"
python ./test/benchmark/plot.py -f "$csv" --output "doc/$png" --title "copy" --xlabel "N" --ylabel "time (ms)"
pip3 install pandas matplotlib