all repos — mgba @ 9d0865d5d4ed433f629811e8372d307b46e6a6d5

mGBA Game Boy Advance Emulator

Tools: Fix closing a perf server
Jeffrey Pfau jeffrey@endrift.com
Sat, 05 Mar 2016 18:11:00 -0800
commit

9d0865d5d4ed433f629811e8372d307b46e6a6d5

parent

b1691c952793d9a290c3aaab3bcdeffd75fadb07

1 files changed, 9 insertions(+), 5 deletions(-)

jump to
M tools/perf.pytools/perf.py

@@ -103,12 +103,15 @@ self.socket.send(os.path.join("/perfroms", test.rom))

self.results.append(next(self.reader)) self.iterations -= 1 if self.iterations == 0: - self.socket.send("\n"); - self.reader = None - self.socket.close() - time.sleep(5) - self.socket = None + self.finish() self.iterations = self.ITERATIONS_PER_INSTANCE + + def finish(self): + self.socket.send("\n"); + self.reader = None + self.socket.close() + time.sleep(5) + self.socket = None class Suite(object): def __init__(self, cwd, wall=None, game=None, renderer='software'):

@@ -153,6 +156,7 @@ return results

if test.results: results.append(test.results) if self.server: + self.server.finish() results.extend(self.server.results) return results