[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #13125 [Tor]: Review the guardiness python script of #9321
#13125: Review the guardiness python script of #9321
------------------------+--------------------------------
Reporter: asn | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.7.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-guard tor-auth
Actual Points: | Parent ID: #9321
Points: |
------------------------+--------------------------------
Comment (by asn):
As mentioned in https://lists.torproject.org/pipermail/tor-
dev/2014-September/007526.html
I refactored the script to use sqlite instead of summary files. You can
find the new script here:
https://gitweb.torproject.org/user/asn/hax.git/shortlog/refs/heads/guardfraction
(`guardfraction` branch instead of `guardiness`)
Here is some times:
{{{
$ time python databaser.py consensus_dir/tmp/ 8
...
DEBUG:root:Parsing consensus 2014-06-05-07-00-00-consensus-microdesc
(2204/2206)!
DEBUG:root:Parsing consensus 2014-08-23-17-00-00-consensus-microdesc
(2205/2206)!
DEBUG:root:Parsing consensus 2014-06-17-00-00-00-consensus-microdesc
(2206/2206)!
real 49m17.897s
user 40m11.616s
sys 0m25.204s
$ time python guardfraction.py 9
DEBUG:root:Read db file with 2206 consensuses info
...
real 0m1.329s
user 0m1.212s
sys 0m0.096s
}}}
Basically, populating the database with 2200 consensuses (3 months) takes
49 minutes, but is only going to happen once. Then calculating the
guardfraction given the guardiness only takes a second. That's better
performance than the summary files, and much easier to sysadmin and
understand.
The script should be ready for review. There are two or three XXXs I need
to fix before deployment, but they are not super important. Please check
the README for usage instructions.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13125#comment:4>
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