Add some resource debug logging.

This commit is contained in:
Richard Kiss 2017-05-27 12:20:24 -07:00
parent 4dc11b047f
commit 5d37737d0d

View File

@ -92,6 +92,9 @@ class SybilNode:
self._routing_table.clear()
if not self._is_paused:
self.__n_max_neighbours = self.__n_max_neighbours * 101 // 100
logging.debug("fetch metadata task count: %d", sum(
x.child_count for x in self.__tasks.values()))
logging.debug("asyncio task count: %d", len(asyncio.Task.all_tasks()))
def datagram_received(self, data, addr) -> None:
# Ignore nodes that uses port 0 (assholes).