[tor-bugs] #25103 [Metrics/Library]: Improve webstats performance

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Feb 5 09:29:58 UTC 2018


#25103: Improve webstats performance
-----------------------------+------------------------------
 Reporter:  iwakeh           |          Owner:  metrics-team
     Type:  enhancement      |         Status:  needs_review
 Priority:  Medium           |      Milestone:
Component:  Metrics/Library  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:  #25100           |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by iwakeh):

 Replying to [comment:10 karsten]:
 >...
 > Fair point. I guess what I meant is a `HashMap<T, T>`, not a
 `HashSet<T>`. Please find [https://gitweb.torproject.org/user/karsten
 /metrics-
 lib.git/commit/?h=task-25103&id=0b501e25907c4decc242fd5698f026d23ff4f944
 commit 0b501e2 in my task-25103 branch] that is based on yours. Mostly
 untested, except for running `ant checks test`.

 Good idea!  This also avoids the awkward `-1` 'treatment'.
 Please find [https://gitweb.torproject.org/user/iwakeh/metrics-
 lib.git/log/?h=task-25103-2 two commits] with a tweak and setting the
 initial capacities for request and date maps to accommodate a year worth
 of data before re-hashing.  It also adds a null-check to `fromMap`.  The
 methods that trigger adding to the value map are only used internally and
 a null value there is a 'pathology'.  It would cause wrong log lines or
 failure later down the processing line.  Better to fail early here.

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


More information about the tor-bugs mailing list