Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

realtime and totals do not match real life #23

Open
maughanorama opened this issue Jun 2, 2018 · 1 comment
Open

realtime and totals do not match real life #23

maughanorama opened this issue Jun 2, 2018 · 1 comment
Labels

Comments

@maughanorama
Copy link

if for instance im on my laptop and download a file say 10mb in size. i do not get the true bandwidth used for that ip.
heres an example
192.168.1.154 usage speedtest.net
in the list of ip 192.168.1.154 total is only 649kb and the realtime is 72 b/s despite my speedtest.net going to 65mb/s
am i missing something ?
thanks

@Kiougar
Copy link
Owner

Kiougar commented Jun 3, 2018

Hey @maughanorama, the way the "realtime" speed is calculated is by dividing the amount of total bytes observed, with the measuring time window (which is equivalent to the auto-refresh interval).
For example, if you have set a 5 seconds refresh interval and let's say 500Kb were downloaded during these 5 seconds, then the "realtime" download speed should be 500Kb / 5s = 100Kb/s.

Now for the speedtest.net case, I don't exactly know how they do it, so don't quote me on this, but from what you suggest it seems the following is happening: They use multiple bursts of small sized byte packets, to measure your speed multiple times by calculating the amount of time your browser took to download these packets. At the end you are presented with the average speed observed. If their measuring time window is significantly smaller than the auto-refresh interval (i.e. this module's measuring time window), then the speed will always be different.

On the other hand, if you download a huge file (i.e. a file that takes longer than X seconds to download - where X is the auto-refresh interval), the realtime speed will always be accurate and theoretically match the maximum speed observed by the speedtest.

Sorry for the block of text - but I wanted to be as detailed as possible :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants