[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #21095 [Metrics/Onionoo]: Accept more values for the "order" parameter
#21095: Accept more values for the "order" parameter
-----------------------------+------------------------------
Reporter: lukechilds | Owner: metrics-team
Type: enhancement | Status: needs_review
Priority: Medium | Milestone:
Component: Metrics/Onionoo | Version:
Severity: Normal | Resolution:
Keywords: metrics-help | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------+------------------------------
Comment (by iwakeh):
Yes! `Comparator` is the way to go about this task.
While looking at the code, I came up with suggestions/wishes:
I'd like to make Onionoo more testable, slowly but surely starting with
this task. The monolithic test approach needs to be broken down, and it
should be way easier to add test case data.
ResourceServletTest is fine for testing the url parameters, but it is
cumbersome for testing the ordering scheme thoroughly.
The Comparator should be a separate class and have it's own test class
(also for not growing RequestHandler more).
And, field names (used more than once) should be constants as well as the
ordering names (for readability and compile time checks). This task can
be broken down into small steps.
I have a
[https://gitweb.torproject.org/user/iwakeh/onionoo.git/commit/?h=task-21095-suggestions&id=3c9e5396a39632147df12087de107d377fc81e30
branch] with suggestions and as proof of the one-by-one concept (It's
**not a patch**, but compiles and passes the existing tests.) Please, see
also the commit comment there.
The remaining field constants could be added one by one and in a `metrics-
help` ticket. Same for the remaining java7 issues (maybe also look for
try-with-resources and similar).
Thoughts?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21095#comment:17>
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