renamed onionr dir and bugfixes/linting progress

This commit is contained in:
Kevin Froman 2019-11-20 04:52:50 -06:00
parent 2b996da17f
commit 720efe4fca
226 changed files with 179 additions and 142 deletions

View file

@ -0,0 +1,16 @@
import os
import onionrblocks
import logger
import coredb
from onionrutils import epoch
def stress_test_block_insert(testmanager):
start = epoch.get_epoch()
count = 100
max_insert_speed = 120
for x in range(count): onionrblocks.insert(os.urandom(32))
speed = epoch.get_epoch() - start
if speed < max_insert_speed:
raise ValueError(f'{count} blocks inserted too fast, {max_insert_speed}, got {speed}')
logger.info(f'runtest stress block insertion: {count} blocks inserted in {speed}s')