diff --git a/src/tests/system/benchmarks/compile_bench.sh b/src/tests/system/benchmarks/compile_bench.sh new file mode 100755 index 0000000000..07bf6018e1 --- /dev/null +++ b/src/tests/system/benchmarks/compile_bench.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +testDir=/tmp/compile_bench +rm -rf $testDir +mkdir -p $testDir +cd $testDir + +cat << EOF > hello_world.cpp +#include + +int +main() +{ + printf("Hello world!\n"); + return 0; +} + +EOF + +compile_all() +{ + for f in $(seq 100); do + echo -n . + g++ -o $f ${f}.cpp + done +} + +for f in $(seq 100); do + cp hello_world.cpp ${f}.cpp +done + +time compile_all + +rm -rf $testDir