Skip to content

Commit

Permalink
Fix ops detection when not proper file close
Browse files Browse the repository at this point in the history
  • Loading branch information
djw8605 committed Feb 2, 2021
1 parent 77fe9ee commit ab8a2af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Collectors/DetailedCollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def addRecord(self, sid, userID, fileClose, timestamp, addr, openTime):
rec['readv'] = fileClose.readv
rec['write'] = fileClose.write

if fileClose.ops:
if isinstance(fileClose, decoding.fileClose) and fileClose.ops:
# read_average (optional)
try:
rec['read_average'] = (fileClose.read + fileClose.readv) / (fileClose.ops.read + fileClose.ops.readv)
Expand Down

0 comments on commit ab8a2af

Please sign in to comment.