From: Rudolf Polzer Date: Fri, 27 Jan 2012 15:30:11 +0000 (+0100) Subject: the big benchmark: move to a subdir; improve log file format X-Git-Tag: xonotic-v0.6.0~30^2~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0a475bed4115b59c80963b7fea509ed638d44ee8;p=xonotic%2Fxonotic.git the big benchmark: move to a subdir; improve log file format --- diff --git a/misc/tools/the-big-benchmark.bat b/misc/tools/the-big-benchmark.bat deleted file mode 100644 index 06cfa5e4..00000000 --- a/misc/tools/the-big-benchmark.bat +++ /dev/null @@ -1,59 +0,0 @@ -@echo off - -cd %~dp0 -cd ..\.. - -echo The Big Benchmark -echo ================= -echo. -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 -:noarg -if "%ProgramFiles(x86)%" == "" goto bit32 -:bit64 -set xonotic=xonotic-64.exe -goto postarg -:bit32 -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 - -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 -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 -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 -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 -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 -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 -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 -del data\engine.log -echo. -echo Please provide the the following info to the Xonotic developers: -echo - CPU speed -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. -echo Thank you -:end -pause diff --git a/misc/tools/the-big-benchmark.sh b/misc/tools/the-big-benchmark.sh deleted file mode 100755 index 3b26a044..00000000 --- a/misc/tools/the-big-benchmark.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh - -set -e - -if [ -d "${0%/*}" ]; then - cd "${0%/*}" -fi -cd ../.. - -echo "The Big Benchmark" -echo " =================" -echo -if [ -f ./all ]; then - echo "WARNING: running this script will destroy ANY local changes you" - echo "might have on the repository that haven't been pushed yet." - echo - if [ x"$1" != x"--yes" ]; then - echo "Are you absolutely sure you want to run this?" - echo - while :; do - echo -n "y/n: " - read -r yesno - case "$yesno" in - y) - break - ;; - n) - echo "Aborted." - exit 1 - ;; - esac - done - fi -fi - -rm -f data/benchmark.log -rm -f data/engine.log -if [ -f ./all ]; then - ./all clean --reclone - ./all compile -r - set -- ./all run "$@" -elif [ -z "$*" ]; then - case "`uname`" in - Darwin) - set -- ./Xonotic.app/Contents/MacOS/xonotic-osx-sdl - ;; - Linux) - set -- ./xonotic-linux-sdl.sh - ;; - *) - echo "OS not detected. Usage:" - echo " $0 how-to-run-xonotic" - echo "On Windows when using a release build or an autobuild," - echo "use the-big-benchmark.bat instead!" - exit 1 - ;; - 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/engine.log -if [ -f ./all ]; then - ./all clean -r -f -u -fi -set +x - -echo -echo "Please provide the the following info to the Xonotic developers:" -echo " - CPU speed" -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 -echo "Thank you" diff --git a/misc/tools/the-big-benchmark/the-big-benchmark.bat b/misc/tools/the-big-benchmark/the-big-benchmark.bat new file mode 100644 index 00000000..862dc0a2 --- /dev/null +++ b/misc/tools/the-big-benchmark/the-big-benchmark.bat @@ -0,0 +1,102 @@ +@echo on + +cd %~dp0 +cd ..\..\.. + +echo The Big Benchmark +echo ================= +echo. +if not exist all goto nogit +echo For Git builds, please use the-big-benchmark.sh instead! +goto end +:nogit +if "%1" == "" goto noarg +set xonotic=%1 +goto postarg +:noarg +if "%ProgramFiles(x86)%" == "" goto bit32 +:bit64 +set xonotic=xonotic-64.exe +goto postarg +:bit32 +set xonotic=xonotic.exe +goto postarg +:postarg + +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 +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: +echo - CPU speed +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 the-big-benchmark.log in the data directory +echo. +echo Thank you +:end +pause diff --git a/misc/tools/the-big-benchmark/the-big-benchmark.sh b/misc/tools/the-big-benchmark/the-big-benchmark.sh new file mode 100755 index 00000000..bba1efff --- /dev/null +++ b/misc/tools/the-big-benchmark/the-big-benchmark.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +set -ex + +if [ -d "${0%/*}" ]; then + cd "${0%/*}" +fi +cd ../../.. + +echo "The Big Benchmark" +echo " =================" +echo +if [ -f ./all ]; then + echo "WARNING: running this script will destroy ANY local changes you" + echo "might have on the repository that haven't been pushed yet." + echo + if [ x"$1" != x"--yes" ]; then + echo "Are you absolutely sure you want to run this?" + echo + while :; do + echo -n "y/n: " + read -r yesno + case "$yesno" in + y) + break + ;; + n) + echo "Aborted." + exit 1 + ;; + esac + done + fi +fi + +if [ -f ./all ]; then + ./all clean --reclone + ./all compile -r + export USE_GDB=no + set -- ./all run "$@" +elif [ -z "$*" ]; then + case "`uname`" in + Darwin) + set -- ./Xonotic.app/Contents/MacOS/xonotic-osx-sdl + ;; + Linux) + set -- ./xonotic-linux-sdl.sh + ;; + *) + echo "OS not detected. Usage:" + echo " $0 how-to-run-xonotic" + echo "On Windows when using a release build or an autobuild," + echo "use the-big-benchmark.bat instead!" + exit 1 + ;; + esac +fi +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 +fi +set +x + +echo +echo "Please provide the the following info to the Xonotic developers:" +echo " - CPU speed" +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 the-big-benchmark.log in the data directory" +echo +echo "Thank you"