From 0a475bed4115b59c80963b7fea509ed638d44ee8 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 27 Jan 2012 16:30:11 +0100 Subject: [PATCH] the big benchmark: move to a subdir; improve log file format --- .../the-big-benchmark.bat | 63 ++++++++++++++++--- .../the-big-benchmark.sh | 40 ++++++------ 2 files changed, 72 insertions(+), 31 deletions(-) rename misc/tools/{ => the-big-benchmark}/the-big-benchmark.bat (55%) rename misc/tools/{ => the-big-benchmark}/the-big-benchmark.sh (69%) diff --git a/misc/tools/the-big-benchmark.bat b/misc/tools/the-big-benchmark/the-big-benchmark.bat similarity index 55% rename from misc/tools/the-big-benchmark.bat rename to misc/tools/the-big-benchmark/the-big-benchmark.bat index 06cfa5e4..862dc0a2 100644 --- a/misc/tools/the-big-benchmark.bat +++ b/misc/tools/the-big-benchmark/the-big-benchmark.bat @@ -1,7 +1,7 @@ -@echo off +@echo on cd %~dp0 -cd ..\.. +cd ..\..\.. echo The Big Benchmark echo ================= @@ -10,8 +10,6 @@ if not exist all goto nogit echo For Git builds, please use the-big-benchmark.sh instead! goto end :nogit -del data\benchmark.log -del data\engine.log if "%1" == "" goto noarg set xonotic=%1 goto postarg @@ -24,26 +22,71 @@ goto postarg set xonotic=xonotic.exe goto postarg :postarg -echo. > data\engine.log -echo Engine log follows: >> data\engine.log -echo =================== >> data\engine.log -set p=+developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos\the-big-keybench.dem +del data\the-big-benchmark.log +del data\benchmark.log +del data\engine.log +set p=+developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos/the-big-keybench.dem + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-omg.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-omg.cfg %p% >> data\engine.log 2>&1 +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-low.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-low.cfg %p% >> data\engine.log 2>&1 +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-med.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-med.cfg %p% >> data\engine.log 2>&1 +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-normal.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-normal.cfg %p% >> data\engine.log 2>&1 +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-high.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-high.cfg %p% >> data\engine.log 2>&1 +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultra.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultra.cfg %p% >> data\engine.log 2>&1 +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +del data/benchmark.log echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultimate.cfg %p% >> data\engine.log %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultimate.cfg %p% >> data\engine.log 2>&1 -type data\engine.log >> data\benchmark.log +find "]quit" data\engine.log >nul +if not errorlevel 1 goto done +type data\engine.log >> data\the-big-benchmark.log +type data\benchmark.log >> data\the-big-benchmark.log + +:done + +del data\benchmark.log del data\engine.log echo. echo Please provide the the following info to the Xonotic developers: @@ -52,7 +95,7 @@ echo - memory size echo - graphics card (which vendor, which model) echo - operating system (including whether it is 32bit or 64bit) echo - graphics driver version -echo - the file benchmark.log in the data directory +echo - the file the-big-benchmark.log in the data directory echo. echo Thank you :end diff --git a/misc/tools/the-big-benchmark.sh b/misc/tools/the-big-benchmark/the-big-benchmark.sh similarity index 69% rename from misc/tools/the-big-benchmark.sh rename to misc/tools/the-big-benchmark/the-big-benchmark.sh index 3b26a044..bba1efff 100755 --- a/misc/tools/the-big-benchmark.sh +++ b/misc/tools/the-big-benchmark/the-big-benchmark.sh @@ -1,11 +1,11 @@ #!/bin/sh -set -e +set -ex if [ -d "${0%/*}" ]; then cd "${0%/*}" fi -cd ../.. +cd ../../.. echo "The Big Benchmark" echo " =================" @@ -33,11 +33,10 @@ if [ -f ./all ]; then fi fi -rm -f data/benchmark.log -rm -f data/engine.log if [ -f ./all ]; then ./all clean --reclone ./all compile -r + export USE_GDB=no set -- ./all run "$@" elif [ -z "$*" ]; then case "`uname`" in @@ -56,22 +55,21 @@ elif [ -z "$*" ]; then ;; esac fi -( - echo - echo "Engine log follows:" - echo " ===================" - set -x - for e in omg low med normal high ultra ultimate; do - USE_GDB=no \ - "$@" \ - +exec effects-$e.cfg \ - +developer 1 \ - -nohome \ - -benchmarkruns 4 -benchmarkruns_skipfirst \ - -benchmark demos/the-big-keybench.dem - done -) >data/engine.log 2>&1 -cat data/engine.log >> data/benchmark.log +rm -f data/the-big-benchmark.log +rm -f data/benchmark.log +rm -f data/engine.log +p="+developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos\the-big-keybench.dem" +for e in omg low med normal high ultra ultimate; do + rm -f data/benchmark.log + echo + "$@" +exec effects-$e.cfg $p > data/engine.log + "$@" +exec effects-$e.cfg $p >>data/engine.log 2>&1 + if grep -xF ']quit' data/engine.log >/dev/null; then + break + fi + cat data/engine.log >> data/the-big-benchmark.log + cat benchmark.log >> data/the-big-benchmark.log +done +rm -f data/benchmark.log rm -f data/engine.log if [ -f ./all ]; then ./all clean -r -f -u @@ -85,6 +83,6 @@ echo " - memory size" echo " - graphics card (which vendor, which model)" echo " - operating system (including whether it is 32bit or 64bit)" echo " - graphics driver version" -echo " - the file benchmark.log in the data directory" +echo " - the file the-big-benchmark.log in the data directory" echo echo "Thank you" -- 2.39.2