Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/ut2003-demo/files/
Date: Mon, 04 Dec 2017 00:06:27
Message-Id: 1512345639.f39b259edd95b3ee52560310cd278e963395fab6.asturm@gentoo
1 commit: f39b259edd95b3ee52560310cd278e963395fab6
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 30 18:27:54 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 4 00:00:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f39b259e
7
8 games-fps/ut2003-demo: remove unused file
9
10 Closes: https://github.com/gentoo/gentoo/pull/6359
11
12 games-fps/ut2003-demo/files/results.py | 61 ----------------------------------
13 1 file changed, 61 deletions(-)
14
15 diff --git a/games-fps/ut2003-demo/files/results.py b/games-fps/ut2003-demo/files/results.py
16 deleted file mode 100644
17 index 3e626239129..00000000000
18 --- a/games-fps/ut2003-demo/files/results.py
19 +++ /dev/null
20 @@ -1,61 +0,0 @@
21 -#!/usr/bin/env python
22 -# Written by phoen][x <phoenix@g.o>, Sep/19/2002
23 -# Modifications, enhancements or bugs? Mail me.
24 -import sys
25 -
26 -def help():
27 - print "Usage"
28 - print " results.py logfile"
29 -
30 -def stats(data,mode):
31 - print(
32 -""">> Score for %s
33 -MinDetail: %f (%d tests)
34 -MaxDetail: %f (%d tests)
35 -Average : %f (%d tests)
36 -""" % (mode,data[0][0]/data[0][1],data[0][1],data[1][0]/data[1][1],data[1][1],
37 - (data[0][0]+data[1][0])/(data[0][1]+data[1][1]),data[0][1]+data[1][1]))
38 -
39 -args = sys.argv[1:]
40 -if "--help" in args:
41 - help()
42 -else:
43 - if len(args):
44 - file = args[0]
45 - else:
46 - import user
47 - file = "%s/.ut2003/Benchmark/bench.log" % user.home
48 - try:
49 - myfile = open(file)
50 - date = myfile.readline()
51 - print(">> Results of the UT2003-demo benchmark")
52 - print(">> created on %s" % date)
53 -
54 - botmatch = ([0,0],[0,0])
55 - flyby = ([0,0],[0,0])
56 -
57 - for line in myfile.readlines():
58 - results = line.split()
59 - category = results[0].split("-")[0]
60 -
61 - if results[2] == "MinDetail":
62 - detail = 0
63 - elif results[2] == "MaxDetail":
64 - detail = 1
65 - else:
66 - assert "Neither MinDetail nor MaxDetail?"
67 -
68 - if category == "botmatch":
69 - botmatch[detail][0] += float(results[13])
70 - botmatch[detail][1] += 1
71 - elif category == "flyby":
72 - flyby[detail][0] += float(results[13])
73 - flyby[detail][1] += 1
74 - else:
75 - assert "Neither botmach nor flyby?"
76 -
77 - stats(botmatch,"Botmatch")
78 - stats(flyby,"FlyBy")
79 -
80 - except IOError:
81 - print("Unable to open file %s" % file)