mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-13 22:47:12 +03:00
Merge pull request #118 from xrobau/master
Fix MB/s calculations on multiple transfers
This commit is contained in:
commit
af9d768410
@ -132,9 +132,15 @@ class ZfsNode(ExecuteNode):
|
|||||||
# actual useful info
|
# actual useful info
|
||||||
if len(progress_fields) >= 3:
|
if len(progress_fields) >= 3:
|
||||||
if progress_fields[0] == 'full' or progress_fields[0] == 'size':
|
if progress_fields[0] == 'full' or progress_fields[0] == 'size':
|
||||||
|
# Reset the total bytes and start the timer again (otherwise the MB/s
|
||||||
|
# counter gets confused)
|
||||||
self._progress_total_bytes = int(progress_fields[2])
|
self._progress_total_bytes = int(progress_fields[2])
|
||||||
|
self._progress_start_time = time.time()
|
||||||
elif progress_fields[0] == 'incremental':
|
elif progress_fields[0] == 'incremental':
|
||||||
|
# Reset the total bytes and start the timer again (otherwise the MB/s
|
||||||
|
# counter gets confused)
|
||||||
self._progress_total_bytes = int(progress_fields[3])
|
self._progress_total_bytes = int(progress_fields[3])
|
||||||
|
self._progress_start_time = time.time()
|
||||||
elif progress_fields[1].isnumeric():
|
elif progress_fields[1].isnumeric():
|
||||||
bytes_ = int(progress_fields[1])
|
bytes_ = int(progress_fields[1])
|
||||||
if self._progress_total_bytes:
|
if self._progress_total_bytes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user