From a08232f1643c7f5fb252963c6669c1fad71a0dad Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Sun, 28 Jul 2019 21:18:13 -0400 Subject: [PATCH] fix claim search kwargs in time to first byte script --- lbry/scripts/time_to_first_byte.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lbry/scripts/time_to_first_byte.py b/lbry/scripts/time_to_first_byte.py index 7835ff6a6..4c921b7c1 100644 --- a/lbry/scripts/time_to_first_byte.py +++ b/lbry/scripts/time_to_first_byte.py @@ -55,10 +55,19 @@ async def main(cmd_args=None): url_to_claim = {} try: for page in range(1, cmd_args.download_pages + 1): - start = time.time() + start = time.perf_counter() + kwargs = { + 'page': page, + # 'claim_type': 'stream', + 'order_by': ['trending_global'], + 'no_totals': True + } + + # if not cmd_args.allow_fees: + # kwargs['fee_amount'] = 0 + response = await daemon_rpc( - conf, 'claim_search', page=page, claim_type='stream', fee_amount=None if cmd_args.allow_fees else 0, - order_by=['trending_global'], no_totals=True + conf, 'claim_search', **kwargs ) if 'error' in response or not response.get('items'): print(f'Error getting claim list page {page}:')