Closed msajid83 closed 7 years ago
Maybe you didn't choose an adequate speed test server. In my samples, I use testdebit.info
which is located in France.
Furthermore, this library doesn't calculate latency/jitter, it doesn't adjust the chunk size depending on the connection speed either and doesn't provide pre-estimation of the connection speed based on small chunk sent to/from server. It doesn't detect anomaly either, for instance here, it is taking away X% slowest chunk and X% fastest chunk downloaded (this anomally detection will be implemented and configurable by user in the next release).
speedtest.net process is described here
This library provides a round calculation of transfer rate for all individual chunks read/written on the period you set.
I will provide a documentation for the library process soon
I appreciate your urgent response. I'll check it.
I've added some notes about that in the Readme here
Well i implemented your sample code with server mentioned in your code and then tested it. It shows very less download speed in bit/sec and comparatively high upload speed in bit/sec.
The other issue that i'm facing is that i have a textview on my activity. I want to update it with current speed reported from onDownloadProgress method. It stops download process when i try to update my textview label from within onDownloadProgress listener method. Why it won't let me update textview.
Well i implemented your sample code with server mentioned in your code and then tested it. It shows very less download speed in bit/sec and comparatively high upload speed in bit/sec. The speedtest.net results are far different.
Do you update your UI in your UI thread ? cf #7
i implemented your sample code with server mentioned in your code
You can test directly the example code as is, to check :
git clone git://github.com/akinaru/speed-test-lib.git
cd speed-test-lib
./gradlew downloadFile
./gradlew uploadFile
Hi,
i have checked it....the download speed results are not matching with speedtest.net, not even near to speedtest.net. Upload is making sense. I'm doing FTP Download.
If speedtest.net DL Speed is 22.73Mbps, your DL speed only shows 0.88Mbps. Its too low.
im converting bit/sec to Mb/sec using formula i.e. Mbps = bps/1000000
Can you please help me in this matter.
For FTP, check with : ./gradlew downloadFTP
test (see previous comment). It uses speedtest.tele2.net
located in Europe. The example is located here.
Then test it with an adequate server by checking the latency (see first comment)
Using v1.23: Giving sendto failed: ECONNRESET (Connection reset by peer) error while running uploading ftp test.
Any guess.
Also its giving more samples in ftp download but giving very low samples in ftp upload.
Maybe, the server your are using is down ? which one is it ? Is it working with lower version ?
I'm running my app with v1.23 on Note 4 G910T (Android Version 4.4.4). I'm connected with ftp server using FILEZILLA.....its uploading and downloading file using FILEZILLA...no issue on this....but in app it gives above mentioned error only while running ftp upload. ftp download is working fine.
i have configured FTP Server on Windows Server 2012
Also its giving more samples in ftp download but giving very low samples in ftp upload.
If what you call low samples
is the number of call to onDownloadProgress
or onUploadProgress
.
This is normal behavior, upload chunk size is fixed, default size is 65535 octet but you can set it with void setUploadChunkSize(int chunkSize)
. For download, onDownloadProgress
is dispatched each time some data is read from the socket. So, you will have technically more onDownload
event than onUpload
events.
there is one more thing....on ftp upload....the initial few samples shows very high speed e.g 100Mb/s and then suddenly drops to normal e.g: 3Mb/s
Can you check the log file of your ftp server to see any kind of specific error ?
there is one more thing....on ftp upload....the initial few samples shows very high speed e.g 100Mb/s and then suddenly drops to normal e.g: 3Mb/s
An existing issue #11 has exactly the same problem on http upload. I couldn't reproduced this issue at the time. I will try to identify the problem
Can you guide me why ftp upload sometimes run and sometimes not....but ftp download always run....
it sometimes hangs here....
if (mSocketInterface.getUploadStorageType() == UploadStorageType.RAM_STORAGE) { /* generate a file with size of fileSizeOctet octet */ fileContent = randomGen.generateRandomArray(fileSizeOctet); } else { uploadFile = randomGen.generateRandomFile(fileSizeOctet); uploadFile.seek(0); }
mFtpOutputstream = ftpClient.storeFileStream(uri);
and then gives error...
now giving EPIPE(broken pipe) on ftp upload
Have you access to your ftp server ? Can you check ftp server logs to see whats happening on server side ?
I have quickly setup a FTP server on Ubuntu and tested FTP upload with
I've not run to any problem like yours. Just check that your upload path does exist but that seems not related to your issue. Also, check for file size limit on your ftp server, try to uploading file with the same size to the same destination using Filezilla to try to reproduce the issue
I'm closing this issue, feel free to reopen if you have any news about your FTP server/client issue. Note that issue #11 (you have encountered) lead to a workaround to set a time from which the speed test rate is calculated for download or upload
speedTestSocket.setDownloadSetupTime(5000);
speedTestSocket.setUploadSetupTime(5000);
Getting sendto failed: EPIPE (Broken pipe) error on uploading.
Which authentication is enabled on your FTP server, basic or anonymous ? Can you access it without problem with some FTP client like Filezilla ? Is upload successfull using Filezilla ? Is SSL enabled on your FTP server ? If possible, can you provide FTP server log when the problem occur ?
Why results not matching with the results measured by speedtest.net