diff options
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/digest-ut2003-demo-2206-r2 | 2 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/misc.tar.bz2 | bin | 0 -> 31851 bytes | |||
-rw-r--r-- | games-fps/ut2003-demo/files/results.py | 61 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/results.sh | 79 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/ut2003-demo | 30 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/ut2003-demo.desktop | 8 |
7 files changed, 217 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..0e2f39d9b525 --- /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=/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 /opt/ut2003-demo/System +for BENCH in /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" +/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/digest-ut2003-demo-2206-r2 b/games-fps/ut2003-demo/files/digest-ut2003-demo-2206-r2 new file mode 100644 index 000000000000..eeb6ae1dca3e --- /dev/null +++ b/games-fps/ut2003-demo/files/digest-ut2003-demo-2206-r2 @@ -0,0 +1,2 @@ +MD5 b28acb17aca17bd2865771de8b75eb89 ut2003demo-lnx-2206.sh.bin 137253079 +MD5 8543c4841a07e9e17f9222f868d9dbe4 IpDrv.so.bz2 124394 diff --git a/games-fps/ut2003-demo/files/misc.tar.bz2 b/games-fps/ut2003-demo/files/misc.tar.bz2 Binary files differnew file mode 100644 index 000000000000..c015a5de81a8 --- /dev/null +++ b/games-fps/ut2003-demo/files/misc.tar.bz2 diff --git a/games-fps/ut2003-demo/files/results.py b/games-fps/ut2003-demo/files/results.py new file mode 100644 index 000000000000..3e626239129d --- /dev/null +++ b/games-fps/ut2003-demo/files/results.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# Written by phoen][x <phoenix@gentoo.org>, Sep/19/2002 +# Modifications, enhancements or bugs? Mail me. +import sys + +def help(): + print "Usage" + print " results.py logfile" + +def stats(data,mode): + print( +""">> Score for %s +MinDetail: %f (%d tests) +MaxDetail: %f (%d tests) +Average : %f (%d tests) +""" % (mode,data[0][0]/data[0][1],data[0][1],data[1][0]/data[1][1],data[1][1], + (data[0][0]+data[1][0])/(data[0][1]+data[1][1]),data[0][1]+data[1][1])) + +args = sys.argv[1:] +if "--help" in args: + help() +else: + if len(args): + file = args[0] + else: + import user + file = "%s/.ut2003/Benchmark/bench.log" % user.home + try: + myfile = open(file) + date = myfile.readline() + print(">> Results of the UT2003-demo benchmark") + print(">> created on %s" % date) + + botmatch = ([0,0],[0,0]) + flyby = ([0,0],[0,0]) + + for line in myfile.readlines(): + results = line.split() + category = results[0].split("-")[0] + + if results[2] == "MinDetail": + detail = 0 + elif results[2] == "MaxDetail": + detail = 1 + else: + assert "Neither MinDetail nor MaxDetail?" + + if category == "botmatch": + botmatch[detail][0] += float(results[13]) + botmatch[detail][1] += 1 + elif category == "flyby": + flyby[detail][0] += float(results[13]) + flyby[detail][1] += 1 + else: + assert "Neither botmach nor flyby?" + + stats(botmatch,"Botmatch") + stats(flyby,"FlyBy") + + except IOError: + print("Unable to open file %s" % file) diff --git a/games-fps/ut2003-demo/files/results.sh b/games-fps/ut2003-demo/files/results.sh new file mode 100644 index 000000000000..6810f4dbc805 --- /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..592cd17ad1c7 --- /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="/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 diff --git a/games-fps/ut2003-demo/files/ut2003-demo.desktop b/games-fps/ut2003-demo/files/ut2003-demo.desktop new file mode 100644 index 000000000000..14681a951004 --- /dev/null +++ b/games-fps/ut2003-demo/files/ut2003-demo.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=UT2003-demo +Comment=Unreal Tournament 2003 Demo +Exec=ut2003-demo +Icon=ut2003.png +Terminal=0 +Type=Application +Categories=Application;Game; |