Skip to content

Commit

Permalink
Benchmark script
Browse files Browse the repository at this point in the history
  • Loading branch information
QazCetelic committed Feb 22, 2024
1 parent 28bccb1 commit aae8c62
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/bash

if [ -n "$1" ]; then
count="$1"
else
count=5
fi

if [[ "$PWD" != "/mnt/ramdisk" ]]; then
echo "Run on RAMDISK"
exit 1
fi

amount="1000000"
for i in $(seq $count); do
echo "($i/$count) Started solving ${amount} sudoku's..."
cat "./${amount}.txt" | /bin/time -f "Solved in %e seconds" sudo nice -19 ./sudoku > ./output
done

0 comments on commit aae8c62

Please sign in to comment.