[tor-bugs] #25924 [Metrics/Statistics]: Improve execution time of onion service statistics module

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 22 10:22:00 UTC 2019


#25924: Improve execution time of onion service statistics module
--------------------------------+------------------------------
 Reporter:  karsten             |          Owner:  karsten
     Type:  enhancement         |         Status:  needs_review
 Priority:  Medium              |      Milestone:
Component:  Metrics/Statistics  |        Version:
 Severity:  Normal              |     Resolution:
 Keywords:                      |  Actual Points:
Parent ID:                      |         Points:
 Reviewer:                      |        Sponsor:
--------------------------------+------------------------------
Changes (by karsten):

 * status:  accepted => needs_review


Comment:

 Alright, I think I know what's going on. The reason why runtime keeps
 getting higher is that we're re-processing an ever increasing number of
 onion service statistics reported by relays for which we computed a
 network fraction of zero for having observed these statistics. Of course,
 it does make sense not to extrapolate these numbers, because we cannot
 divide by zero. But we should remember this fact and not attempt to
 extrapolate statistics in all future executions. That's also what we do
 with statistics reported by relays with non-zero network fractions: we
 notice that we did extrapolate these before and skip them. This is the
 reason why runtime keeps getting higher and higher over time. The fix is
 simply to write extrapolated numbers for all reported statistics.

 Please review [https://gitweb.torproject.org/user/karsten/metrics-
 web.git/commit/?h=task-25924&id=ed4f75df1a246afdc86b2c38f95a31e6a37a5d33
 commit ed4f75d in my task-25924 branch]. I did test this branch locally,
 but before deploying it we should make fresh a backup of
 `work/modules/hidserv/`, just in case.

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


More information about the tor-bugs mailing list