facebookarchive / network-connection-class

Listen to current network traffic in the app and categorize the quality of the network.
Other
3.19k stars 515 forks source link

Calculate upload speed #5

Closed jalpesh closed 9 years ago

jalpesh commented 9 years ago

I could not figure out how to calculate the upload speed, Is there any way this is possible?

SeyelentEco commented 9 years ago

You can modify the QTagParser class to parse the tx_bytes too. https://github.com/facebook/network-connection-class/blob/master/connectionclass/src/main/java/com/facebook/network/connectionclass/QTagParser.java#L65

We don't record / calculate the upload speed because there usually aren't enough large uploads to be able to get a reliable measurement. It could be added pretty easily if your app has that requirement but most apps don't upload enough data to get a measurement we could rely on.

jalpesh commented 9 years ago

Thank you SeyelentEco..