Add benchmark/benchmark-throughput.sh
Tests / Run-Tests (push) Successful in 6s Details
Benchmarks / Run-Benchmarks (push) Successful in 2m39s Details

multiline-output
drunkendog 2023-09-18 13:46:37 +01:00
parent 5e5e8f5fdf
commit 7e7c8f82d9
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
mkdir temp
cd temp
cp "../benchmark-program-2.c" "benchmark-program-2.c"
for _ in {1..100000}
do
int_get=$RANDOM
echo -e "${int_get}\n$((int_get))\n" >> "benchmark-program-2.cases"
done
export DEBIAN_FRONTEND=noninteractive
echo "$(($(stat -c '%s' benchmark-program-2.cases) / $(/usr/bin/time -f '%e' ${@:1} > /dev/null)"
cd ../ && rm -rf temp/