bytes / 1024 == kilobytes

hdd manufacturers use /1000 or /1000000 or /1000000000 to make it where they can market a 4TB drive that isnt really 4TB because they redefined what 4TB is

Sent from my iPhone

On Sep 7, 2017, at 17:09, Philippe Sultan <philippe.sultan@gmail.com> wrote:

Hi,

The bandwidth computation in the HTML5 JavaScript client in file html5/verto/js/src/jquery.jsonrpcclient.js, is :

var up_kps = (((this.speedBytes * 8) / (this.up_dur / 1000)) / 1024).toFixed(0);
var down_kps = (((this.speedBytes * 8) / (this.down_dur / 1000)) / 1024).toFixed(0);

this.speedBytes being the total number of transferred bytes, converted to bits after *8, I was wondering if the total shouldn't be divided by 1000 rather than 1024 in order to get a a result in kbits/s, that is :

var up_kps = (((this.speedBytes * 8) / (this.up_dur / 1000)) / 1000).toFixed(0);
var down_kps = (((this.speedBytes * 8) / (this.down_dur / 1000)) / 1000).toFixed(0);

Am I missing something here ? Thanks !

Philippe
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org