Opened 9 months ago
Closed 9 months ago
#29712 closed defect (not a bug)
sbws should use 1024 to convert kilobytes to bytes
Reported by: | teor | Owned by: | |
---|---|---|---|
Priority: | Low | Milestone: | sbws: 1.0.x-final |
Component: | Core Tor/sbws | Version: | |
Severity: | Minor | Keywords: | |
Cc: | juga | Actual Points: | |
Parent ID: | Points: | 0.2 | |
Reviewer: | Sponsor: |
Description (last modified by )
sbws converts kilobytes to bytes using 1000. But most systems use 1024 to conviert kilobytes to bytes.
Fixing this issue is not a high priority, because bandwidth measurements are only 20-50% accurate.
Also, the conversion factor should be a constant, rather than copying 1024 to lots of places in the code.
Child Tickets
Change History (3)
comment:1 Changed 9 months ago by
Description: | modified (diff) |
---|
comment:2 follow-up: 3 Changed 9 months ago by
Network bandwidth measurements are by convention represented in KB, MB, GB units etc. rather than KiB, MiB, Gib. One example is Linux traffic control. Torflow and other Tor software apply KB with the notable exception of Atlas, which IMO is incorrect.
comment:3 Changed 9 months ago by
Resolution: | → not a bug |
---|---|
Status: | new → closed |
Replying to starlight:
Network bandwidth measurements are by convention represented in KB, MB, GB units etc. rather than KiB, MiB, Gib. One example is Linux traffic control. Torflow and other Tor software apply KB with the notable exception of Atlas, which IMO is incorrect.
You're right, Torflow and pytorctl use 1000:
https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/aggregate.py#n62
https://gitweb.torproject.org/pytorctl.git/tree/TorCtl.py#n1221
Edit: use a constant