Closed esalvati closed 2 years ago
Hi @esalvati , thanks for the contribution! I think this still needs different logic for the suffixes (K, M, G, etc.), since the values for these are in bytes (lines 277 - 279), so you're comparing bits against bytes with the bw variable.
Hi @fflewddur. Thanks for the reply. In this case, it doesn't matter. For example, 2 Mbytes (2097152 bytes) would be shown as 2 MB/s with BANDWIDTH_IN_BITS as false or, if BANDWIDTH_IN_BITS is true, would be converted to 16 Mbits (16777216 bits) and shown as 16 Mb/s. The variable unit (B/b) will change accordingly.
Ah, you're right, sorry for the confusion. Thanks for the contribution!
Keeping de default behavior unchanged, added the option to specify via lib/config.js bandwidth in bits per second.