[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #29367 [Metrics/Onionperf]: Port OnionPerf to Python 3
#29367: Port OnionPerf to Python 3
---------------------------------------+--------------------------------
Reporter: irl | Owner: karsten
Type: defect | Status: needs_revision
Priority: Medium | Milestone:
Component: Metrics/Onionperf | Version:
Severity: Normal | Resolution:
Keywords: metrics-team-roadmap-2020 | Actual Points:
Parent ID: #33318 | Points: 2
Reviewer: | Sponsor: Sponsor59
---------------------------------------+--------------------------------
Changes (by phw):
* status: needs_review => needs_revision
Comment:
Your patch looks good to me but I found two additional issues:
* I assume you're running the tests by executing run_tests.sh? The tests
`test_reprocessing.test_log_collection_tgen` and
`test_reprocessing.test_log_collection_torctl` fail for me because the two
paths in the lists differ in their ordering. These unit tests rely on
`os.walk`, which internally calls `os.scandir`, which yields files in
[https://docs.python.org/3/library/os.html#os.scandir random order]. Looks
like these tests are broken but we can fix this issue by calling `sorted`
on the arbitrarily ordered file names.
[https://github.com/NullHypothesis/onionperf/commit/2ab97fc8082c03ff5f1c8d775f417bfee8936726
Here's a patch].
* I ran the tool 2to3 over all source files and it suggested turning
`dict_keys` and `dict_values` objects in analysis.py into `list`.
[https://github.com/NullHypothesis/onionperf/commit/16556497d431f032e789294fa55191637e5a23aa
Here's a patch]. All unit tests still pass.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29367#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs