Opened 3 years ago

Closed 3 years ago

#20802 closed defect (fixed)

last metric point of "1 Week graph" of exit probability is 1 hour ahead in the future

Reported by: toralf Owned by: irl
Priority: Medium Milestone:
Component: Metrics/Relay Search Version: Tor: 0.2.9.5-alpha
Severity: Minor Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

It is now

mr-fox ~ # date
Sun Nov 27 23:02:17 CET 2016
mr-fox ~ # date -u
Sun Nov 27 22:02:19 UTC 2016

and Atlas shows for the relay https://atlas.torproject.org/#details/1AF72E8906E6C49481A791A6F8F84F8DFEBBB2BA already "2016-11-27 23:30: 0.000193%" if I hover with the mouse over the last data point of that graph.

Child Tickets

Change History (9)

comment:1 Changed 3 years ago by karsten

Good catch, confirmed! This is likely related to d3.time.format() using the browser's timezone for formatting timestamps rather than the UTC timezone. There might be similar lines. I could try to fix this, but I'd prefer to leave this to somebody else who is better at JavaScript development than I.

comment:2 Changed 3 years ago by RaBe

Owner: changed from irl to RaBe
Status: newassigned

comment:3 Changed 3 years ago by RaBe

Owner: changed from RaBe to karsten

It seems this is by design - all graphs show the next data point by its individual time interval setting, so the data since the last data point has a place to go. E.g. the last data point of the 5-year-graph is already February 8th, 2017 :) I'd say we leave it like that...

comment:4 Changed 3 years ago by karsten

RaBe, I'm not sure I understand what you're saying. But I just found a possibly related bug. Consider these two links:

https://atlas.torproject.org/#details/1AF72E8906E6C49481A791A6F8F84F8DFEBBB2BA

https://onionoo.torproject.org/weights?lookup=1AF72E8906E6C49481A791A6F8F84F8DFEBBB2BA

The 3-month weights graph on the Atlas page shows 2016-11-27 18:00:00 as first data point and 2017-02-01 06:00:00 as last data point.

But Onionoo tells me the following:

"3_months":{
  "first":"2016-11-27 06:00:00",
  "last":"2017-01-31 18:00:00",
  "interval":43200,
  "factor":7.158203801551552E-6,
  "count":132,
  "values":[...]

Note the definition of "first" from the Onionoo protocol page: "UTC timestamp (YYYY-MM-DD hh:mm:ss) of the first data point, or more specifically the interval midpoint of the first interval."

Could it be that we're adding the interval seconds once too often for the graph?

comment:5 Changed 3 years ago by karsten

Owner: changed from karsten to RaBe

comment:6 Changed 3 years ago by RaBe

Owner: changed from RaBe to irl

I think I found it. The time interval was added BEFORE drawing/labeling each data point, so starting with the very first one, each data point was exactly one time interval in the future. Here's a patch:

https://github.com/RaphaelBergmann/atlas/commit/deff5d4cc32df2a101fa02c50cd96fdba8fd0384

comment:7 Changed 3 years ago by RaBe

Status: assignedneeds_review

comment:8 Changed 3 years ago by karsten

I did not test this patch, and don't take this comment as actual review, but the fix looks plausible to me.

comment:9 Changed 3 years ago by irl

Resolution: fixed
Status: needs_reviewclosed

Works for me. Merged. (:

Note: See TracTickets for help on using tickets.