Skip to content

Latest commit

 

History

History
77 lines (69 loc) · 2.61 KB

dev.org

File metadata and controls

77 lines (69 loc) · 2.61 KB
rm -rf build
meson setup build

testing

Note: you need boost installed for the benchmark tests

meson configure build -Dtest=true
meson configure build -Doptimization=2
meson test -C build -v

benchmark

meson test -C build --benchmark -v

meson configure build -Doptimization=0
meson configure build -Doptimization=2
meson configure build -Doptimization=3

benchmark dependencies

# boost (for boost rtree)
sudo apt install libboost-all-dev

python plot

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)"

python dependencies

pip3 install pandas matplotlib