#! /bin/bash
#
#
#
set -e

# build the project
echo "Building project..."
rm -r build
cmake -S . -B build
cmake --build build

# run the tests
echo "Running benchmarks..."
curr_iter=$(date +%s)

for input in build/numbers_*.txt
do
	ibase=$(basename $input)
	echo -e "\trunning $ibase..."
	/usr/bin/time --format="$curr_iter,$ibase,%e,%S,%U,%M,%K" \
		--output=counting_stats.csv -a\
		-- ./build/counting $input
done
