bertrandmartel / speed-test-lib

:cloud: JSpeedTest : speed test client library for Java/Android
MIT License
381 stars 119 forks source link

Add update stat interval #28

Closed DimaDDM closed 7 years ago

DimaDDM commented 7 years ago

Hello. Can you add interval for updating upload\download stats? Thanks.

bertrandmartel commented 7 years ago

Do you mean to receive speed test report callback at regular interval ? This can be done with

void startDownload(java.lang.String hostname, int port, java.lang.String uri, int reportInterval) Start download process.

and

void startUpload(java.lang.String hostname, int port, java.lang.String uri, int fileSizeOctet, int reportInterval) Start upload process.

There is also reportInterval argument for fixedUpload and fixedDownload

You can look at all the arguments available in SpeedTestSocket class : https://oss.sonatype.org/service/local/repositories/releases/archive/fr/bmartel/jspeedtest/1.25/jspeedtest-1.25-javadoc.jar/!/index.html

DimaDDM commented 7 years ago

Thanks for this information but can you add this as param for SpeedTestSocket?

ac-opensource commented 7 years ago

@DimaDDM It's already a param in startDownload and startUpload. You already submitted an issue before reading the source code.

bertrandmartel commented 7 years ago

I agree reportInterval is something repetitive in most of SpeedTestSocket method and could be set optionnally at class instanciation