[metrics-bugs] #34103 [Metrics/Website]: Stop rounding y axis labels with units
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun May 3 14:21:06 UTC 2020
#34103: Stop rounding y axis labels with units
---------------------------------+----------------------
Reporter: karsten | Owner: karsten
Type: defect | Status: assigned
Priority: Medium | Milestone:
Component: Metrics/Website | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
---------------------------------+----------------------
The [https://metrics.torproject.org/torperf.html Time to download files
over Tor graph] now displays the following labels, all using seconds as
units: 0, 0, 1, 2, 2, 2. Better labels would be 0.0, 0.5, 1.0, 1.5, 2.0,
2.5.
Similarly, the [https://metrics.torproject.org/advbwdist-
perc.html?start=2015-01-19&end=2020-04-18&p=50 Advertised bandwidth
distribution graph] showing the median displays the following labels, all
using Gbit/s: 0.00, 0.02, 0.05, 0.08. Better labels would be 0.000, 0.025,
0.050, 0.075.
The underlying issue, which we didn't fix in #33933 nor in #33066, is that
we have to pick a number of digits for a graph which then needs to work
for whichever scale is being displayed. In some cases this is difficult to
do right (first graph above with measurements apparently getting faster
over time), in other cases it's impossible (second graph above with 1st
and 99th percentile having different orders of magnitude).
The fix is to stop using the `unit_format` function from the somewhat
outdated `scales` package that we're using and instead write our own
function for formatting labels with units.
I'm going to attach two example graphs where this went wrong plus a patch
that I'll review more carefully tomorrow before I deploy it on the server.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/34103>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list