diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-fps/ut2003-demo/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'games-fps/ut2003-demo/files')
-rw-r--r-- | games-fps/ut2003-demo/files/benchmark | 37 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/results.sh | 79 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/ut2003-demo | 30 |
3 files changed, 146 insertions, 0 deletions
diff --git a/games-fps/ut2003-demo/files/benchmark b/games-fps/ut2003-demo/files/benchmark new file mode 100644 index 000000000000..2047897da9ab --- /dev/null +++ b/games-fps/ut2003-demo/files/benchmark @@ -0,0 +1,37 @@ +#!/bin/sh +# Originally from linuxforen.de +# Modified by phoen][x <phoenix@gentoo.org>, Sep/19/2002 +# Modifications, enhancements or bugs? Mail me. + +# Tweaks by Daniel Robbins <drobbins@gentoo.org> 25 Feb 2003 + +STUFF=GAMES_PREFIX_OPT/ut2003-demo/Benchmark/Stuff +MYPATH=${HOME}/.ut2003/Benchmark +TEMPLOG=${MYPATH}/benchmark.log +LOG=${MYPATH}/bench.log + +[ -d ${MYPATH} ] || mkdir -p ${MYPATH} + +rm -f ${TEMPLOG} ${LOG} +touch ${TEMPLOG} ${LOG} + +date > $LOG + +echo ">> Starting benchmark" +cd GAMES_PREFIX_OPT//ut2003-demo/System +for BENCH in GAMES_PREFIX_OPT//ut2003-demo/Benchmark/*-*.sh +do + echo "Running ${BENCH} with MinDetail" + ${BENCH} -ini=${STUFF}/MinDetail.ini -userini=${STUFF}/MinDetailUser.ini &> /dev/null + echo -n "${BENCH} / MinDetail / " >> ${LOG} + cat ${TEMPLOG} | tail -n1 >> ${LOG} + + echo "Running ${BENCH} with MaxDetail" + ${BENCH} -ini=${STUFF}/MaxDetail.ini -userini=${STUFF}/MaxDetailUser.ini &> /dev/null + echo -n "${BENCH} / MaxDetail / " >> ${LOG} + cat ${TEMPLOG} | tail -n1 >> ${LOG} +done + +echo ">> Benchmark complete" +GAMES_PREFIX_OPT/ut2003-demo/Benchmark/results.sh +echo ">> Use 'ut2003-demo --results' to show these results again (without benchmarking)" diff --git a/games-fps/ut2003-demo/files/results.sh b/games-fps/ut2003-demo/files/results.sh new file mode 100644 index 000000000000..a74cf909c9ad --- /dev/null +++ b/games-fps/ut2003-demo/files/results.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# Written by phoen][x <phoenix@gentoo.org>, Sep/21/2002 +# Modifications, enhancements or bugs? Contact games@gentoo.org + +[[ -z "${1}" ]] \ + && FILE="${HOME}/.ut2003/Benchmark/bench.log" \ + || FILE="${1}" + +CURLINE=0 + +BM_MIN_SCORE=0 +BM_MIN_COUNT=0 +BM_MAX_SCORE=0 +BM_MAX_COUNT=0 + +FB_MIN_SCORE=0 +FB_MIN_COUNT=0 +FB_MAX_SCORE=0 +FB_MAX_COUNT=0 + +while read LINE ; do + CURLINE=`expr $CURLINE + 1` + if [[ ${CURLINE} -eq 1 ]] ; then + echo ">> Results of the UT2003-demo benchmark" + echo ">> Created on ${LINE}" + continue + fi + + set -- ${LINE} + TYPE=$(echo $(basename ${1}) | cut -d- -f1) + DETAIL=${3} + SCORE=${14} + + case ${TYPE} in + "botmatch") + case ${DETAIL} in + "MinDetail") + BM_MIN_SCORE=`echo ${BM_MIN_SCORE} + ${SCORE} | bc` + BM_MIN_COUNT=`expr ${BM_MIN_COUNT} + 1` + ;; + "MaxDetail") + BM_MAX_SCORE=`echo ${BM_MAX_SCORE} + ${SCORE} | bc` + BM_MAX_COUNT=`expr ${BM_MAX_COUNT} + 1` + ;; + esac + ;; + "flyby") + case ${DETAIL} in + "MinDetail") + FB_MIN_SCORE=`echo ${FB_MIN_SCORE} + ${SCORE} | bc` + FB_MIN_COUNT=`expr ${FB_MIN_COUNT} + 1` + ;; + "MaxDetail") + FB_MAX_SCORE=`echo ${FB_MAX_SCORE} + ${SCORE} | bc` + FB_MAX_COUNT=`expr ${FB_MAX_COUNT} + 1` + ;; + esac + ;; + esac +done < ${FILE} + +BM_MIN_AVG=`echo "scale=6; ${BM_MIN_SCORE} / ${BM_MIN_COUNT}" | bc` +BM_MAX_AVG=`echo "scale=6; ${BM_MAX_SCORE} / ${BM_MAX_COUNT}" | bc` +BM_ALL_AVG=`echo "scale=6; (${BM_MIN_SCORE} + ${BM_MAX_SCORE}) / (${BM_MIN_COUNT} + ${BM_MAX_COUNT})" | bc` + +FB_MIN_AVG=`echo "scale=6; ${FB_MIN_SCORE} / ${FB_MIN_COUNT}" | bc` +FB_MAX_AVG=`echo "scale=6; ${FB_MAX_SCORE} / ${FB_MAX_COUNT}" | bc` +FB_ALL_AVG=`echo "scale=6; (${FB_MIN_SCORE} + ${FB_MAX_SCORE}) / (${FB_MIN_COUNT} + ${FB_MAX_COUNT})" | bc` + +echo " +>> Score for Botmatch +MinDetail: ${BM_MIN_AVG} (${BM_MIN_COUNT} tests) +MaxDetail: ${BM_MAX_AVG} (${BM_MAX_COUNT} tests) +Average : ${BM_ALL_AVG} (`expr ${BM_MIN_COUNT} + ${BM_MAX_COUNT}` tests) + +>> Score for FlyBy +MinDetail: ${FB_MIN_AVG} (${FB_MIN_COUNT} tests) +MaxDetail: ${FB_MAX_AVG} (${FB_MAX_COUNT} tests) +Average : ${FB_ALL_AVG} (`expr ${FB_MIN_COUNT} + ${FB_MAX_COUNT}` tests)" diff --git a/games-fps/ut2003-demo/files/ut2003-demo b/games-fps/ut2003-demo/files/ut2003-demo new file mode 100644 index 000000000000..56d7e10e6a73 --- /dev/null +++ b/games-fps/ut2003-demo/files/ut2003-demo @@ -0,0 +1,30 @@ +#!/bin/bash +# Written by phoen][x <phoenix@gentoo.org>, Sep/19/2002 +# Modifications, enhancements or bugs? Mail me. + +INSTALL="GAMES_PREFIX_OPT//ut2003-demo" + +case ${1} in + "--results") + pushd ${INSTALL}/Benchmark &> /dev/null + ./results.sh + popd &> /dev/null + ;; + "--bench") + pushd ${INSTALL}/Benchmark &> /dev/null + ./benchmark + popd &> /dev/null + ;; + "--help") + echo "Usage:" + echo " ut2003-demo [--bench] || [--results]" + echo " Optional parameters, only one at a time." + echo " --bench : starts ut2003-demo in benchmark mode" + echo " --results : outputs the results of your last benchmark" + ;; + *) + pushd ${INSTALL} &> /dev/null + ./ut2003_demo + popd &> /dev/null + ;; +esac |