[metrics-bugs] #24419 [Metrics/Onionoo]: Improve getter names for boolean fields

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Oct 13 12:56:35 UTC 2018

#24419: Improve getter names for boolean fields
 Reporter:  karsten          |          Owner:  metrics-team
     Type:  enhancement      |         Status:  new
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:

Comment (by efgyirfe784):

 Please see https://gitlab.com/743zpnpGUq27GgR/onionoo/tree/24419-isXY for
 a proposed solution to this ticket.

 Please note:

 1. I did not change
 "getUnmeasured()" to "isUnmeasured()" because the interface
 org.torproject.descriptor.NetworkStatusEntry requires it, and I figured
 org.torproject.descriptor is outside the scope of this ticket. Note
 however that many docs classes had a "getMeasured()" method that is now
 "isMeasured()", which differs slightly from NetworkStatusEntry's

 2. Several classes in org.torproject.metrics.onionoo.docs (like
 SummaryDocument) have a field called "isRelay" which has a getter method
 named "isRelay()". I think this makes sense because of what the field
 represents, but some folks prefer not to have field names repeated as
 method names. I didn't change this, just an FYI.

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

More information about the metrics-bugs mailing list