Code design


  • Link to refactor proposal.
  • Change this page when refactoring is implemented.

UML classes diagram

UML classes diagram


Packages diagram

packages diagram


scanner threads

  • TorEventListener: the thread that runs Tor and listens for events.
  • ResultDump: the thread that get the measurement results from a queue every second.
  • multiprocessing.ThreadPool starts 3 independent threads: - workers_thread - tasks_thread - results_thread
  • measurement threads: they execute sbws.core.scanner.measure_relay() There’ll be a maximum of 3 by default.
scanner threads

Critical sections

Data types that are read or wrote from the threads.

scanner critical sections

Call graph

Initialization calls to the moment where the measurement threads start.

call graph