[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 dgoulet):
Here is what I can find "code wise":
commit 6006c4abe884c2084f98404d06669836a77c9f49
* add_laplace_noise() uses sample_laplace_distribution() with a "long"
value which might be very problematic if a double is expected. You
basically loose the float part. If this is the intended goal, I would put
a comment explaining why since "long" and "double" are quite different.
* NAN is a GNU extension which might be problematic without a fallback on
BSD or/and Windows. I'm not to familiar with that macro outside Linux.
* +round_long_to_next_multiple_of(): probably a typo but "unsigned
divisor", is a "long" or "int" is missing here? It's allowed but I really
think that types should be *always* specified, just for the sake of the
reviewers :).
* round_long_to_next_multiple_of() will "Floating point exception" if
"divisor" is 0. Modulo with 0 is not really a good thing :). In this case,
I was able to make it coredump with number == LONG_MIN and divisor set to
0.
commit 6c3263b5b56e0b6e953226af240f2f607a2fa415
* I see that there are multiple places where "hs_stats" is checked and if
NULL, it's allocated. Shouldn't we call "rep_hist_hs_stats_init()"
instead? Seems to me that having the start interval time set is important
when initializing the digestmap.
* rep_hist_hs_stats_init(): double space:
{{{
if (!hs_stats) {
}}}
The rest seems fine to me for now.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13192#comment:13>
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