marmoset-test-cases/benchmark/benchmark.sh

24 lines
377 B
Bash
Raw Normal View History

2023-09-16 21:08:39 +01:00
#!/bin/bash
set -e
mkdir temp
cd temp
for i in {1..100}
2023-09-16 21:08:39 +01:00
do
cp "../benchmark-program-1.c" "benchmark-program-1-${i}.c"
done
for i in {1..100}
2023-09-16 21:08:39 +01:00
do
for _ in {1..10000}
2023-09-16 21:08:39 +01:00
do
int_get=$RANDOM
echo "${int_get}\n$((int_get + 123))\n" >> "benchmark-program-1-${i}.cases"
2023-09-16 21:08:39 +01:00
done
done
TIMEFORMAT=%0R /usr/bin/time ${@:1} > /dev/null
2023-09-16 21:08:39 +01:00
cd ../ && rm -rf temp/