2023-09-16 21:08:39 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir temp
|
|
|
|
cd temp
|
|
|
|
|
2023-09-25 20:03:31 +01:00
|
|
|
for i in {1..5}
|
2023-09-16 21:08:39 +01:00
|
|
|
do
|
|
|
|
cp "../benchmark-program-1.c" "benchmark-program-1-${i}.c"
|
|
|
|
done
|
|
|
|
|
2023-09-25 20:03:31 +01:00
|
|
|
for i in {1..5}
|
2023-09-16 21:08:39 +01:00
|
|
|
do
|
2023-09-25 20:03:31 +01:00
|
|
|
for _ in {1..1000}
|
2023-09-16 21:08:39 +01:00
|
|
|
do
|
|
|
|
int_get=$RANDOM
|
2023-09-16 22:10:07 +01:00
|
|
|
echo -e "${int_get}\n$((int_get + 123))\n" >> "benchmark-program-1-${i}.cases"
|
2023-09-16 21:08:39 +01:00
|
|
|
done
|
|
|
|
done
|
|
|
|
|
2023-09-16 22:07:05 +01:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2023-09-16 22:32:07 +01:00
|
|
|
/usr/bin/time -f "%e" ${@:1} > /dev/null
|
2023-09-16 21:08:39 +01:00
|
|
|
|
|
|
|
cd ../ && rm -rf temp/
|