Skip to content

Commit

Permalink
Fix #167 - Add bytes sent to post-query log message.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Jan 29, 2019
1 parent a9142da commit e8422e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions irrd/server/whois/query_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ def _fetch_process_query(self) -> None:
response = self.query_parser.handle_query(query)
self.ready_to_send_result.wait()
self.ready_to_send_result.clear()
self.response_callback(response.generate_response().encode('utf-8'))
response_bytes = response.generate_response().encode('utf-8')
self.response_callback(response_bytes)
elapsed = time.perf_counter() - start_time
logger.info(f'{self.peer_str}: sent answer to query, elapsed {elapsed}s: {query}')
logger.info(f'{self.peer_str}: sent answer to query, elapsed {elapsed}s, {len(response_bytes)} bytes: {query}')

def ready_for_next_result(self) -> None:
"""
Expand Down

0 comments on commit e8422e3

Please sign in to comment.