[metrics-bugs] #33360 [Metrics/Onionoo]: IntegerDistribution breaks when given negative values

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Feb 18 08:33:48 UTC 2020


#33360: IntegerDistribution breaks when given negative values
---------------------------------+--------------------------
     Reporter:  karsten          |      Owner:  metrics-team
         Type:  defect           |     Status:  new
     Priority:  Medium           |  Milestone:
    Component:  Metrics/Onionoo  |    Version:
     Severity:  Normal           |   Keywords:
Actual Points:                   |  Parent ID:
       Points:                   |   Reviewer:
      Sponsor:                   |
---------------------------------+--------------------------
 As found in #27981, our unit tests fail when being run in 1990.

 The reason is that we're using a hard-coded time for sending the request
 (2013-04-24 12:22:22) and the current system time for determining when we
 handled the request. We compute the difference of the two timestamps as
 the time needed for handling the request. But `IntegerDistribution` does
 not accept negative values.

 That's a bug. It should either reject negative values in its `addLong`
 method, or it should store them and include them in the result. I'd prefer
 the second variant, even though we're not using it for negative values
 under normal circumstances.

 Not blocking the upcoming 8.0 protocol update.

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


More information about the metrics-bugs mailing list