1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00

Merge pull request #464 from sdpenguin/master

revent.py: Fix handling of zero-event files
This commit is contained in:
marcbonnici 2017-08-11 17:43:06 +01:00 committed by GitHub
commit 335fff2a6f

View File

@ -142,9 +142,10 @@ class ReventRecording(object):
first = last = events.next() first = last = events.next()
except StopIteration: except StopIteration:
self._duration = 0 self._duration = 0
for last in events: else:
pass for last in events:
self._duration = (last.time - first.time).total_seconds() pass
self._duration = (last.time - first.time).total_seconds()
else: # not streaming else: # not streaming
if not self._events: if not self._events:
self._duration = 0 self._duration = 0