forked from LBRYCommunity/lbry-sdk
perf counter
This commit is contained in:
parent
de50214e1f
commit
dc6194f862
1 changed files with 2 additions and 2 deletions
|
@ -112,9 +112,9 @@ class MemPool:
|
||||||
"""Print regular logs of mempool stats."""
|
"""Print regular logs of mempool stats."""
|
||||||
self.logger.info('beginning processing of daemon mempool. '
|
self.logger.info('beginning processing of daemon mempool. '
|
||||||
'This can take some time...')
|
'This can take some time...')
|
||||||
start = time.time()
|
start = time.perf_counter()
|
||||||
await synchronized_event.wait()
|
await synchronized_event.wait()
|
||||||
elapsed = time.time() - start
|
elapsed = time.perf_counter() - start
|
||||||
self.logger.info(f'synced in {elapsed:.2f}s')
|
self.logger.info(f'synced in {elapsed:.2f}s')
|
||||||
while True:
|
while True:
|
||||||
self.logger.info(f'{len(self.txs):,d} txs '
|
self.logger.info(f'{len(self.txs):,d} txs '
|
||||||
|
|
Loading…
Reference in a new issue