Fixed bug in peak memory stats + added unit test

This commit is contained in:
2018-08-16 17:23:47 +02:00
parent 0bfdfb87bc
commit 99fdb422ef
3 changed files with 695 additions and 3 deletions

View File

@@ -64,13 +64,13 @@ class Stats:
match = self.re_cycles_memory.match(line)
if match:
mem = util.humanReadableSizeToMegabytes(match.group(1))
peak = util.humanReadableSizeToMegabytes(match.group(1))
peak = util.humanReadableSizeToMegabytes(match.group(2))
if self.device_memory_usage == "N/A" or \
mem > self.device_memory_usage:
self.device_memory_usage = mem
if self.device_peak_memory == "N/A" or \
mem > self.device_peak_memory:
self.device_peak_memory = mem
peak > self.device_peak_memory:
self.device_peak_memory = peak
def getCurrentProgress(self):
if self.total_tiles == 0: