marmoset-test-cases/benchmark/benchmark-throughput.sh

18 lines
376 B
Bash
Raw Normal View History

2023-09-18 13:46:37 +01:00
#!/bin/bash
set -e
mkdir temp
cd temp
cp "../benchmark-program-2.c" "benchmark-program-2.c"
2023-09-25 20:03:51 +01:00
for _ in {1..5000}
2023-09-18 13:46:37 +01:00
do
int_get=$RANDOM
echo -e "${int_get}\n$((int_get))\n" >> "benchmark-program-2.cases"
done
export DEBIAN_FRONTEND=noninteractive
2023-09-18 13:50:30 +01:00
echo "$(($(stat -c '%s' benchmark-program-2.cases) / $(/usr/bin/time -f '%e' ${@:1} > /dev/null)))"
2023-09-18 13:46:37 +01:00
cd ../ && rm -rf temp/