[Freeswitch-dev] HTML5 Verto speed test computation question
Ken Rice
krice at freeswitch.org
Sat Sep 9 22:01:29 UTC 2017
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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20170909/69663c38/attachment.html>
More information about the FreeSWITCH-dev
mailing list