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

Merge pull request #304 from jimboatarm/uxperf-fix

UXPERF: handle error when only one timestamp is logged
This commit is contained in:
setrofim 2016-12-02 16:58:33 +00:00 committed by GitHub
commit b4036c5f15

View File

@ -229,6 +229,7 @@ class UxPerfParser(object):
'''
Creates a data frame containing fps metrics for a captured action.
'''
if len(action) == 2:
start, end = map(int, action)
df = pd.read_csv(frames)
# SurfaceFlinger Algorithm
@ -243,6 +244,9 @@ class UxPerfParser(object):
if field:
df = df[start < df[field]]
df = df[df[field] <= end]
else:
self.logger.warning('Discarding action. Expected 2 timestamps, got {}!'.format(len(action)))
df = pd.DataFrame()
return df
def _read(self, log):