facebookarchive / network-connection-class

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

ConnectionClassManager.getDownloadKBitsPerSecond() returns bits/second instead? #36

Open kwalker-git opened 7 years ago

kwalker-git commented 7 years ago

ConnectionClassManager.getDownloadKBitsPerSecond() returns ExponentialGeometricAverage.getAverage(). Each measurement used to determine the average is converted to bits per second by ConnectionClassManager.addBandwidth(). So is getDownloadKBitsPerSecond() misnamed?

ConnectionClassManager.addBandwidth() - double bandwidth = (bytes) 1.0 / (timeInMs) BYTES_TO_BITS; mDownloadBandwidth.addMeasurement(bandwidth);

YodaEmbedding commented 4 years ago

See https://github.com/facebook/network-connection-class/issues/14