[tor-bugs] #19259 [Metrics/Onionoo]: uncaught NFE

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jun 27 19:29:13 UTC 2016


#19259: uncaught NFE
-----------------------------+-----------------------------------
 Reporter:  iwakeh           |          Owner:  iwakeh
     Type:  defect           |         Status:  needs_information
 Priority:  High             |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Major            |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+-----------------------------------

Comment (by karsten):

 Replying to [comment:14 iwakeh]:
 > That was the information I was intending to elicit :-) Thanks!
 >
 > Just a few things left:
 >
 > > How about we represent missing values on disk as empty string (`""`),
 which also saves disk space, and in memory as `-1.0` to keep the current
 code working?
 > >
 > I still would prefer Double.NaN (cf. comment:9) as being more obvious in
 code/in memory.

 Okay, let's use `Double.NaN` then.

 > On disk it could be the empty string even though not very nice, but it's
 used already anyway.

 Okay.  Well, the nice part is that it saves disk space.  We'll just need
 to make it compatible with existing status files that contain negative
 doubles.

 > > > `testCompare` fails, b/c there is an entry with the key from the
 first and values from the second element.
 > >
 > > Let's reject those lines, too.
 > It's not that easy here; the test demonstrates would could happen b/c of
 the
 > comparator not being compatible with equal.
 > So the missing part is an ordering for the intervals. The only one I can
 think
 > of is the lexicographical ordering according to interval ends, e.g.,
 > [10, 20] before [10, 21] before [12, 25].  That should capture the
 intend of
 > the current approach?

 Okay, sounds good to me.

 Thanks for trying hard to understand this code!

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


More information about the tor-bugs mailing list