shdown / luastatus

universal status bar content generator
GNU General Public License v3.0
295 stars 12 forks source link

"network-rate" uses "binary prefix" divisor (1024) rather than "si prefix" divisor (1000) #59

Closed jaimet closed 4 years ago

jaimet commented 4 years ago

Hi.

(This is more a question, rather than a bug, because I don't know whether your current implementation is "by design" or not.)

network-rate.lua divides by 1024, and so calculates the network rate in "kibibytes per second".

Wikipedia's article on binary prefixes says:

Most computer hardware uses SI prefixes to state capacity and define other performance parameters such as data rate.

(emphasis mine!)

Is your "division by 1024" "by design", or should it be "division by 1000" in order to calculate the network rate in "kilobytes / second"?

shdown commented 4 years ago

Is your "division by 1024" "by design", or should it be "division by 1000" in order to calculate the network rate in "kilobytes / second"?

After conducting some research, I would say that it should probably be “division by 1000”.