[tor-bugs] #6070 [Metrics Website]: Download times in Torperf graphs have always been 1 second too high

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Jun 5 19:09:35 UTC 2012


#6070: Download times in Torperf graphs have always been 1 second too high
-----------------------------+----------------------------------------------
 Reporter:  karsten          |          Owner:  karsten
     Type:  defect           |         Status:  new    
 Priority:  major            |      Milestone:         
Component:  Metrics Website  |        Version:         
 Keywords:                   |         Parent:         
   Points:                   |   Actualpoints:         
-----------------------------+----------------------------------------------
 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
 [https://metrics.torproject.org/performance.html?graph=torperf&start=2012-03-07&end=2012-06-05&source=all&filesize=50kb&dpi=72#torperf
 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.

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


More information about the tor-bugs mailing list