[tor-bugs] #22836 [Metrics/Website]: Parse CollecTor's index.json and provide our own directory listing
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Sep 11 16:43:11 UTC 2017
#22836: Parse CollecTor's index.json and provide our own directory listing
-----------------------------+------------------------------
Reporter: karsten | Owner: karsten
Type: enhancement | Status: needs_review
Priority: Medium | Milestone:
Component: Metrics/Website | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------+------------------------------
Comment (by iwakeh):
I'm wondering about the wait-construct when no index is available:
The thread could be interrupted for any reason a short time (e.g. 5ms)
after calling wait and the index preparation might not be done. And, more
likely, it is not interrupted and then there is a wait of 10 seconds, but
I'd guesstimate index creation takes way less than one second. Thus, it
might be useful to 1) embed the wait in a loop checking if the waiting
time elapsed or if there is an index available.
2) Secondly, the actual call to wait should use only 200 ms (or some other
amount way smaller than 10000) as value.
There are three `format*` methods together with
`extractDirectoryListings`, which do not depend on the actual object and
should be made static. As these `format*` plus `extractDirectoryListings`
methods prepare the output, I really would like to see tests here. This
is not an empty exercise, but facilitates easier maintenance in future and
enables review in first place.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22836#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list