Opened 8 years ago

Closed 8 years ago

#6070 closed defect (fixed)

Download times in Torperf graphs have always been 1 second too high

Reported by: karsten Owned by: karsten
Priority: High Milestone:
Component: Metrics/Website Version:
Severity: Keywords:
Cc: arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


We recently changed metrics-web to use the new Torperf data file format .tpf instead of Torperf's .data files. This seemed to work fine, but a side-effect of this change was that download times magically went down by about 1 second. This is most visible in the 50 KiB graphs.

I found the problem: download times in the graphs have always been 1 second too high! Here's the problematic old code that now got replaced:

-                long completeMillis = Long.parseLong(parts[16])
-                    * 1000L + Long.parseLong(parts[17]) / 1000L
-                    - Long.parseLong(parts[0]) * 1000L
-                    + Long.parseLong(parts[1]) / 1000L;

parts[16] and parts[17] are the seconds and microseconds when a download was completed, and parts[0] and parts[1] was when the request was started. Note how there should be parentheses around the last two lines? Instead of subtracting the microseconds when the request was started, we added them. Assume that this number was 500,000 in the mean, so that the overall result was by 1,000,000 microseconds or 1 second too high in the mean. Oops.

This problem is already fixed in the code with the move to metrics-lib and the new .tpf format. The new numbers since early June 2012 are correct.

I'll have to re-do the existing Torperf statistics. This bug was present since we first added Torperf graphs to the metrics website in January 2010.

Child Tickets

Attachments (2)

torperf-50kb-all-2012-03-08-72-2012-06-06-OLD.png (18.2 KB) - added by karsten 8 years ago.
torperf-50kb-all-2012-03-08-72-2012-06-06-NEW.png (19.3 KB) - added by karsten 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 8 years ago by karsten

Resolution: fixed
Status: newclosed

The Torperf graphs on the metrics website are now fixed. As an example for later reference, this broken graph was replaced with this fixed graph.

Nothing else to fix here. Closing.

Note: See TracTickets for help on using tickets.