Skip to content

Commit

Permalink
change log msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommel71 committed Aug 21, 2024
1 parent b655ce4 commit 249c95b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/graphsenselib/deltaupdate/deltaupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def update_transformed(
batch_size=10,
):
updater.prepare_database()
action = None

with graceful_ctlc_shutdown() as shutdown_initialized:
for b in batch(range(start_block, end_block + 1), n=batch_size):
logger.info(
Expand All @@ -157,10 +157,12 @@ def update_transformed(
blocks_processed = (updater.last_block_processed - start_block) + 1
to_go = end_block - max(b)
bps = blocks_processed / updater.elapsed_seconds_global
bps_batch = len(b) / updater.elapsed_seconds_last_batch

logger.info(
f"Batch of {len(b)} blocks took "
f"{updater.elapsed_seconds_last_batch:.3f} s that's "
f"{bps:.3f} blocks per second. Approx. {((to_go / bps) / 60):.3f} "
f"{bps_batch:.1f} blks/s. Approx. {((to_go / bps) / 60):.3f} "
"minutes remaining."
)

Expand Down

0 comments on commit 249c95b

Please sign in to comment.