- Edit Readme

- Make it actually run speedtests and not just use fake numbers lol
master
Nixellion 2020-06-23 00:38:01 +03:00
parent 34c17fe452
commit f0a4411799
2 changed files with 24 additions and 12 deletions

View File

@ -1,3 +1,15 @@
# BroSpeedTester
Runs speedtests and generates graphs and plots periodically. Scheduled with cronjob or task scheduler.
Runs speedtests and generates graphs and plots periodically. Scheduled with cronjob or task scheduler.
# Dependencies
```
apt-get install libatlas-base-dev
nano /etc/pip.conf
[global]
extra-index-url=https://www.piwheels.org/simple
pip3 install --verbose -r requirements.txt
pip3 install speedtest-cli
```

View File

@ -56,20 +56,20 @@ if __name__ == "__main__":
threads = None
log.debug("Initializing speedtest...")
# s = speedtest.Speedtest()
s = speedtest.Speedtest()
log.debug(f"Running test...")
# s.get_servers(servers)
# s.get_best_server()
# s.download(threads=threads)
# s.upload(threads=threads, pre_allocate=False)
#
# results_dict = s.results.dict()
# download = round(results_dict['download']/1000000, 2)
# upload = round(results_dict['upload']/1000000, 2)
download = uniform(0,2)
upload = uniform(0,2)
s.get_servers(servers)
s.get_best_server()
s.download(threads=threads)
s.upload(threads=threads, pre_allocate=False)
results_dict = s.results.dict()
download = round(results_dict['download']/1000000, 2)
upload = round(results_dict['upload']/1000000, 2)
# download = uniform(0,2)
# upload = uniform(0,2)
log.debug(f"{download}mbps, {upload}mbps")