1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

Merge pull request #305 from jimboatarm/utilfps-fix

util-fps: handle divide by zero possibility
This commit is contained in:
setrofim 2016-12-02 16:56:59 +00:00 committed by GitHub
commit 8e0b793f89

View File

@ -111,8 +111,9 @@ class FpsProcessor(object):
not_at_vsync = self.data.IntendedVsync - self.data.Vsync not_at_vsync = self.data.IntendedVsync - self.data.Vsync
not_at_vsync = not_at_vsync[not_at_vsync != 0].count() not_at_vsync = not_at_vsync[not_at_vsync != 0].count()
duration = self.data.Vsync.iloc[-1] - self.data.Vsync.iloc[0] if frame_count > 1:
fps = (1e9 * frame_count) / float(duration) duration = self.data.Vsync.iloc[-1] - self.data.Vsync.iloc[0]
fps = (1e9 * frame_count) / float(duration)
# If gfxinfocsv is provided, get stats from that instead # If gfxinfocsv is provided, get stats from that instead
if self.extra_data: if self.extra_data: