Bug#586943: [PATCH] Fix a broken human-readable unit calculations

2010-11-06 Thread Adam Majer
Attached is a better patch. Seems that when you are editing the commit message, you cannot correct the patch anymore... The change from the patch is formatting and using 512 instead of 500, as per the commit message. - Adam -- Adam Majer ad...@zombino.com >From e689bf73dcc677142f24fe96c3fa6dc70

Bug#586943: [PATCH] Fix a broken human-readable unit calculations

2010-11-06 Thread Adam Majer
Statistics::getUnitFactor and Statistics::getUnitString were not consistent and difficult to understand. The readout displayed incorrect values like 0.9kBps while the actual rate was 0.9MBps. The current function will switch to next-higher rate value when rate exceeds 512.0 units/s. --- src/stati