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

how do i understand the value of connect type? #97

Closed
hq229075284 opened this issue Jan 26, 2018 · 6 comments
Closed

how do i understand the value of connect type? #97

hq229075284 opened this issue Jan 26, 2018 · 6 comments

Comments

@hq229075284
Copy link

image
You can see from the picture above.In 4G mode,what's mean that 171s and +166s?

@zouhir
Copy link
Owner

zouhir commented Jan 28, 2018

Hey! Sorry for my delayed response.

Ultimately, your assets should load < 5s on your target audience connection type.

Your asset's in this photo will load under this budget for 20mbps connection only and you have 1s room.

I apologize as in this beta, things are not super clear but I'll definitely work on the UX and improve this section.

@hq229075284
Copy link
Author

In other word,except for 20mbps,everything else is fake data?

@zouhir
Copy link
Owner

zouhir commented Jan 29, 2018

No, it's connection speed data from webpagetest.org

Your bundle is huge :) or it's dev bundle, looking at Global Average

Connection Speed is: 0.4mpbs === 400kbps
RTT = 160ms

and your assets will take 182s to download on that speed (~3min)

@TimoStaudinger
Copy link
Contributor

@zouhir I found the numbers on the dashboard a bit confusing as well, so I dug into it a little. It seems like the way it is implemented right now messes up some units along the way:

let time = assetsSize / 1024 / (i.internet_speed * 1024 / 8) + i.rtt;

, where assetsSize is the size of the bundle in kB if I'm not wrong, converted to MB via assetsSize / 1024. i.internet_speed is the bandwidth in mbps, converted to kbps via i.internet_speed * 1024, and to kBps via ... / 8. That means, we effectively compare MB to kBps here.

Also, I believe the RTT, i.rtt, is listed in milliseconds, not seconds, so we are adding milliseconds to seconds without conversion.

I took the example from the screenshot in the read-me, with a bundle size of ~920kB, and did some calculations in Excel:

speed

Those times seem much more reasonable to me than what we are seeing in the screenshot, e.g. ~180s download time of ~920kB via 4G.

Considering those points, I believe the correct formula should be:

let time = assetsSize / (i.internet_speed * 1024 / 8) + (i.rtt / 1000);

Let me know if I missed something. If you agree with my logic, I'll submit a PR later.

@zouhir
Copy link
Owner

zouhir commented Jan 29, 2018

I swear I knew something didn't make sense in my quick and dirty calculations 😂 thank you for looking at this bit, your calculations are the correct ones, I welcome a PR!!!!

@hq229075284
Copy link
Author

I'm sorry to see the reply so late.I'm just as confused as @timosta is.Pack a small file, but display it on the dashborad for such a long time.

The explanation given by @timosta is detailed and taught.

thank you @zouhir @timosta

@zouhir zouhir closed this as completed in 5924473 Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants