Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/fusion_engine_client/parsers/mixed_log_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ def _print_progress(self, file_size=None):
if file_size is None:
file_size = min(self.file_size_bytes, self.max_bytes)

if self.total_bytes_read - self.last_print_bytes > 10e6 or self.total_bytes_read == file_size:
if self.total_bytes_read < self.last_print_bytes or \
self.total_bytes_read - self.last_print_bytes > 10e6 or \
self.total_bytes_read == file_size:
elapsed_sec = (datetime.now() - self.start_time).total_seconds()
self.logger.log(logging.INFO if show_progress else logging.DEBUG,
'Processed %d/%d bytes (%.1f%%). [elapsed=%.1f sec, rate=%.1f MB/s]' %
Expand Down Expand Up @@ -589,6 +591,8 @@ def filter_in_place(self, key, clear_existing: Union[bool, str] = False,
if self.index is not None:
if len(self.index) == 0:
self.next_index_elem = 0
elif prev_offset_bytes < 0:
self.next_index_elem = 0
else:
idx = np.argmax(self.index.offset > prev_offset_bytes)
if idx == 0 and self.index.offset[0] <= prev_offset_bytes:
Expand Down
Loading