Skip to content

Commit

Permalink
count restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
undertherain committed Jul 5, 2021
1 parent 357d218 commit e116b1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vecto/corpus/iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def __init__(self, tree, start):
self.tree = tree
self.id_file = start[0]
self.start_offset = start[1]
self._cnt_restarts = 0

def _generate_samples(self):
filename = self.tree[self.id_file][0]
Expand All @@ -117,6 +118,7 @@ def _generate_samples(self):
self.id_file += 1
if self.id_file >= len(self.tree):
self.id_file = 0
self._cnt_restarts += 1
file_in = detect_archive_format_and_open(self.tree[self.id_file][0])


Expand Down

0 comments on commit e116b1b

Please sign in to comment.