Here is a simple way to get an average Internet connection speed over a given period of time. For example I would like to test my Internet connection speed every 10 minutes, log the result and calculate average. First run test ( ask you Internet provide to provide you with a local download file.
The above will run test 100 times every 10 minutes. It will take 16.6667 hours to complete. As my download file is approximately 8MB in size the whole test will eat up about 800MB.
Once the test is complete we can see download speed of each test with:
1 2 3 4 5
From here we can also calculate average download speed.