stem.util.str_tools.get_size_label() insufficiently precise
There is a known issue in Arm that causes AccountingMax sizes to be displayed with insufficient precision. For example, a real AccountingMax of 1850 GB will be displayed as 1 TB.
https://trac.torproject.org/projects/tor/ticket/12452
This is confusing and perplexing, especially for those worried about big bandwidth overage charges.
It seems that this is an issue with stem.util.str_tools.get_size_label()
, which is itself mostly a wrapper for stem.util.str_tools._get_label()
. These functions format and return the string that is then displayed:
(the call in arm)
(the called Stem function)
Here's the above example problem returned from the master branch of Stem (version 0.1.2.3, I believe), cloned on 20-08-2014. 1850000000000 is 1850 GB converted to bytes:
>>> from stem.util.str_tools import get_size_label
>>> get_size_label(1850000000000)
'1 TB'
Trac:
Username: mmcc