Skip to content
Snippets Groups Projects
Verified Commit ca8df9fb authored by Varac's avatar Varac
Browse files

Add missing docstrings

parent 56e51308
No related branches found
No related tags found
No related merge requests found
[general]
ignore=body-is-missing
#!/usr/bin/python3 #!/usr/bin/python3
"""Export speedtest up- and download speed metrics to prometheus."""
import socket import socket
import speedtest import speedtest
import time import time
from prometheus_client import start_http_server, Summary, Gauge from prometheus_client import start_http_server, Gauge
servers = [] servers = []
# If you want to test against a specific server # If you want to test against a specific server
...@@ -18,6 +20,7 @@ g_upload = Gauge('upload_speed', 'Upload speed') ...@@ -18,6 +20,7 @@ g_upload = Gauge('upload_speed', 'Upload speed')
def process_request(t): def process_request(t):
"""Measure up- and download speed using speedtest."""
s.get_servers(servers) s.get_servers(servers)
s.get_best_server() s.get_best_server()
s.download() s.download()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment