[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 20:13:47 UTC 2017

#22836: Parse CollecTor's index.json and provide our own directory listing
 Reporter:  karsten          |          Owner:  karsten
     Type:  enhancement      |         Status:  needs_revision
 Priority:  Medium           |      Milestone:
Component:  Metrics/Website  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
Changes (by karsten):

 * status:  needs_review => needs_revision


 Replying to [comment:11 iwakeh]:
 > I'm wondering about the [https://gitweb.torproject.org/karsten/metrics-
 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.

 Agreed about the loop.

 But keep in mind that the timeout is for the time between sending a
 request for an `index.json` file until receiving and processing the
 response. If this were a local operation I'd say 200 ms are enough, but
 with the possible network delay I'd say we need to give it at least a few
 seconds. If 10000 ms are too much, how about 2000 ms?

 > 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.


 This is on my list now. Will post a revised branch once I have one.

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22836#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tor-bugs mailing list