1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-10-30 14:44:09 +00:00

FPS - fix regex and handle empty frames

This commit is contained in:
Michael McGeagh
2016-11-07 17:39:51 +00:00
parent f99c6f5656
commit dcf13f8c2c
2 changed files with 7 additions and 6 deletions

View File

@@ -108,12 +108,13 @@ class FpsProcessor(object):
per_frame_fps.name = 'fps'
frame_count = self.data.index.size
janks = frame_time[frame_time >= vsync_interval].count()
not_at_vsync = self.data.IntendedVsync - self.data.Vsync
not_at_vsync = not_at_vsync[not_at_vsync != 0].count()
if frame_count:
janks = frame_time[frame_time >= vsync_interval].count()
not_at_vsync = self.data.IntendedVsync - self.data.Vsync
not_at_vsync = not_at_vsync[not_at_vsync != 0].count()
duration = self.data.Vsync.iloc[-1] - self.data.Vsync.iloc[0]
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 self.extra_data: