mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-07 13:41:24 +00:00
FPS - fix regex and handle empty frames
This commit is contained in:
parent
f99c6f5656
commit
dcf13f8c2c
@ -277,7 +277,7 @@ class LatencyCollector(threading.Thread):
|
|||||||
else:
|
else:
|
||||||
self.header = GfxInfoFrame._fields
|
self.header = GfxInfoFrame._fields
|
||||||
self.process_trace_line = self._process_gfxinfo_line
|
self.process_trace_line = self._process_gfxinfo_line
|
||||||
self.re_frame = re.compile('[0-9,]+')
|
self.re_frame = re.compile('([0-9]+,)+')
|
||||||
self.re_stats = re.compile('.*(percentile|frames|Number).*')
|
self.re_stats = re.compile('.*(percentile|frames|Number).*')
|
||||||
# Create a template summary text block that matches what gfxinfo gives after a reset
|
# Create a template summary text block that matches what gfxinfo gives after a reset
|
||||||
# - 133 is the default ms value for percentiles after reset
|
# - 133 is the default ms value for percentiles after reset
|
||||||
|
@ -108,12 +108,13 @@ class FpsProcessor(object):
|
|||||||
per_frame_fps.name = 'fps'
|
per_frame_fps.name = 'fps'
|
||||||
|
|
||||||
frame_count = self.data.index.size
|
frame_count = self.data.index.size
|
||||||
janks = frame_time[frame_time >= vsync_interval].count()
|
if frame_count:
|
||||||
not_at_vsync = self.data.IntendedVsync - self.data.Vsync
|
janks = frame_time[frame_time >= vsync_interval].count()
|
||||||
not_at_vsync = not_at_vsync[not_at_vsync != 0].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]
|
duration = self.data.Vsync.iloc[-1] - self.data.Vsync.iloc[0]
|
||||||
fps = (1e9 * frame_count) / float(duration)
|
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user