[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #13192 [Tor]: Collect aggregate stats of total hidden service usage vs total exit usage in Tor network



#13192: Collect aggregate stats of total hidden service usage vs total exit usage
in Tor network
-----------------------------+---------------------------------
     Reporter:  arma         |      Owner:
         Type:  enhancement  |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.???
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  SponsorR, tor-relay
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+---------------------------------

Comment (by asn):

 Nice code!

 Small review:

 * I need to think more about the overflow protection in
 `round_long_to_next_multiple_of()`. I'm not sure what happens if there is
 actually an overflow there and that line is skipped.

 * Where can I find the formula you are using in
 `transform_uniform_random_to_laplace()`?  Also, maybe we could rename that
 function to `sample_laplace_distribution()` or something.

 * When you do `digestmap_free(hs_stats->onions_seen_this_period, NULL)` do
 the elements of the digestmap get freed? I think you need to pass the
 `tor_free_()` func as the second argument?

 * ` This value, multiplied with EPSILON, is Laplace parameter b. */` I
 think this is divided not multiplied.

 * An interesting consequence of rounding up negative numbers is that a
 result of 0 doesn't mean that the underlying value was also 0. In our case
 it can be anything from -7 to 0. This is not something bad but something
 to keep in mind.

 * BTW, wrt to this unittest
 `tt_assert(round_long_to_next_multiple_of(LONG_MIN,2) == LONG_MIN)`. It is
 the case in all platforms that `LONG_MIN` is even, right?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13192#comment:9>
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