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

UXPERF: handle error when only one timestamp is logged

This commit is contained in:
Michael McGeagh 2016-12-02 16:29:15 +00:00
parent 68697a42a7
commit 64c352fab6

View File

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