[metrics-bugs] #24296 [Metrics/Onionoo]: Make Onionoo's document classes available as part of metrics-lib

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jul 6 07:24:51 UTC 2018


#24296: Make Onionoo's document classes available as part of metrics-lib
-----------------------------+------------------------------
 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 karsten):

 Replying to [comment:2 irl]:
 > Possibly `org.torproject.metrics.bot.tor.ZonedDateTimeDeserializer`
 (although this was written for Gson, not Jackson). This is useful to
 provide a consistent date/time parsing to avoid having to parse it in
 every consumer of the documents.

 Okay, I'm not sure how to do this in Jackson, but I'll look into using
 `ZonedDateTime` rather than `String` for timestamps.

 > I would like to have `org.torproject.metrics.bot.tor.RelayFlag` in
 metrics-lib, with a function to return these from details documents. I
 didn't write a deserializer for these yet though and it would also mean
 that the flags images would need to be included in metrics-lib.

 Hmm, the downside of having an enum like that is that we'll have to put
 out a new metrics-lib release whenever there's a new flag. I'll think more
 about this.

 > There are also the
 `org.torproject.metrics.bot.tor.{BaseRelay,Bridge,Relay}` interfaces that
 could be included in metrics-lib. The `generateBadge()` methods can be
 ignored, I'll move these to seperate badge classes.

 Yes, I was planning to include interfaces like `RelaySummaryDocument`
 containing all fields in a relay details object, and the same for
 `BridgeSummaryDocument`, `RelayDetailsDocument`, etc. I'll take a look at
 those metrics-bot interfaces while writing those for metrics-lib.

 Alright, I'll give this a try and let you know when I have something to
 look at. Thanks!

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


More information about the metrics-bugs mailing list