Skip to content

Commit

Permalink
added replay percents to the log
Browse files Browse the repository at this point in the history
  • Loading branch information
cogutvalera committed Sep 21, 2018
1 parent beef041 commit 83a66c8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions libraries/chain/db_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,15 @@ void database::reindex( fc::path data_dir )
{
total_processed_block_size = _block_id_to_block.blocks_current_position();

std::cerr << " [by size: "
<< double(total_processed_block_size) / total_block_size * 100 << "% "
<< total_processed_block_size << " of " << total_block_size << "] ";
std::cerr << " [by num: " << double(i*100)/last_block_num << "% " << i << " of " << last_block_num << "] \n";
ilog(
" [by size: ${size}% ${processed} of ${total}] [by num: ${num}% ${i} of ${last}]",
("size", double(total_processed_block_size) / total_block_size * 100)
("processed", total_processed_block_size)
("total", total_block_size)
("num", double(i*100)/last_block_num)
("i", i)
("last", last_block_num)
);
}
if( i == flush_point )
{
Expand Down

0 comments on commit 83a66c8

Please sign in to comment.