commit 10fc8134065a57f5c2c1d012e70cbe13ba6a700f Merge: d713b29 40fd99d Author: Damian Johnson atagar@torproject.org Date: Mon Jan 30 09:55:07 2017 -0800
Speed tests and descriptor parsing
During my morning commute I've been looking into Stem's test speed. Faster tests mean quicker development cycles, so nice investment for the future.
Main changes are...
* Greatly sped up descriptor parsing, especially when there's validation. Should help with memory usage too.
* When running our tests with the --verbose argument we now show individual test runtimes. This isn't a capability python's unittest module has so providing it in our test_tools util.
Unit tests improved quite a bit on my netbook but has no negligible impact on my PC. Integ tests however have improved quite a bit, dropping from 57.0s to 44.7s (22% faster).
docs/change_log.rst | 5 +++ run_tests.py | 14 +++++-- stem/descriptor/__init__.py | 46 ++++++++++++----------- stem/descriptor/networkstatus.py | 10 ++--- stem/process.py | 5 ++- stem/util/test_tools.py | 51 ++++++++++++++++++++++++++ test/integ/control/base_controller.py | 29 +++++++-------- test/integ/control/controller.py | 67 ++++++---------------------------- test/integ/descriptor/remote.py | 4 +- test/integ/process.py | 8 ++-- test/integ/socket/control_message.py | 22 ++++++----- test/integ/util/connection.py | 18 ++++----- test/mocking.py | 10 +++++ test/output.py | 28 ++++++++++++++ test/unit/connection/authentication.py | 28 +++++--------- test/unit/control/controller.py | 2 +- test/unit/version.py | 6 +-- test/util.py | 5 +++ 18 files changed, 211 insertions(+), 147 deletions(-)