Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #6070

Closed (moved)
Open
Opened Jun 05, 2012 by Karsten Loesing@karsten

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

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#6070