]> git.xonotic.org Git - xonotic/xonotic.git/blob - the-big-benchmark.sh
the-big-benchmark: test all effects config levels
[xonotic/xonotic.git] / the-big-benchmark.sh
1 #!/bin/sh
2
3 set -e
4
5 echo "The Big Benchmark"
6 echo " ================="
7 echo
8 echo "WARNING: running this script will destroy ANY local changes you"
9 echo "might have on the repository."
10 echo
11 if [ x"$1" != x"--yes" ]; then
12         echo "Are you absolutely sure you want to run this?"
13         echo
14         while :; do
15                 echo -n "y/n: "
16                 read -r yesno
17                 case "$yesno" in
18                         y)
19                                 break
20                                 ;;
21                         n)
22                                 echo "Aborted."
23                                 exit 1
24                                 ;;
25                 esac
26         done
27 fi
28
29 set -x
30 rm -f data/*.log
31 ./all clean --reclone
32 ./all compile -r
33 (
34         set -x
35         for e in omg low med normal high ultra ultimate; do
36                 USE_GDB=no \
37                 ./all run \
38                         +exec effects-$e.cfg \
39                         "$@" \
40                         -nohome \
41                         -benchmarkruns 4 -benchmarkruns_skipfirst \
42                         -benchmark demos/the-big-keybench.dem
43         done
44 ) >data/engine.log 2>&1
45 ./all clean -r -f -u
46 set +x
47
48 echo
49 echo "Please provide the the following info to the Xonotic developers:"
50 echo " - CPU speed"
51 echo " - memory size"
52 echo " - graphics card (which vendor, which model)"
53 echo " - operating system (including whether it is 32bit or 64bit)"
54 echo " - graphics driver version"
55 echo " - the file "
56 cat data/benchmark.log
57 echo
58 echo "Thank you"