mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
replace tx/s by nan
for the first result
This commit is contained in:
parent
a8dbe60854
commit
2c58ef857c
@ -79,9 +79,12 @@ def run_gather_metrics(args):
|
||||
|
||||
num_transactions_received += block_num_transactions
|
||||
elapsed_time = time_now - initial_time
|
||||
elapsed_time = elapsed_time if elapsed_time != 0 else 1
|
||||
percent_complete = round((num_transactions_received / num_transactions) * 100)
|
||||
transactions_per_second = round(num_transactions_received / elapsed_time)
|
||||
|
||||
if elapsed_time != 0:
|
||||
transactions_per_second = round(num_transactions_received / elapsed_time)
|
||||
else:
|
||||
transactions_per_second = float('nan')
|
||||
|
||||
logger.info('\t{:<20} {:<20} {:<20} {:<20}'.format(time_now, block_num_transactions,
|
||||
transactions_per_second, percent_complete))
|
||||
|
Loading…
x
Reference in New Issue
Block a user