Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Speedtest-for-InfluxDB-and-Grafana
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
Speedtest-for-InfluxDB-and-Grafana
Commits
c38c67a1
Commit
c38c67a1
authored
6 years ago
by
Carey, Matthew
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug causing crash with invalid server ID
parent
d250078b
Branches
Issue-21
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
influxspeedtest/InfluxdbSpeedtest.py
+14
-12
14 additions, 12 deletions
influxspeedtest/InfluxdbSpeedtest.py
with
14 additions
and
12 deletions
influxspeedtest/InfluxdbSpeedtest.py
+
14
−
12
View file @
c38c67a1
...
@@ -71,17 +71,7 @@ class InfluxdbSpeedtest():
...
@@ -71,17 +71,7 @@ class InfluxdbSpeedtest():
log
.
critical
(
'
Failed to get speedtest.net configuration. Aborting
'
)
log
.
critical
(
'
Failed to get speedtest.net configuration. Aborting
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
try
:
self
.
speedtest
.
get_servers
(
server
)
self
.
speedtest
.
get_servers
(
server
)
except
speedtest
.
NoMatchedServers
:
log
.
error
(
'
No matched servers: %s
'
,
server
)
return
except
speedtest
.
ServersRetrievalError
:
log
.
critical
(
'
Cannot retrieve speedtest.net server list. Aborting
'
)
sys
.
exit
(
1
)
except
speedtest
.
InvalidServerIDType
:
log
.
error
(
'
%s is an invalid server type, must be int
'
,
server
)
return
log
.
debug
(
'
Picking the closest server
'
)
log
.
debug
(
'
Picking the closest server
'
)
...
@@ -120,7 +110,19 @@ class InfluxdbSpeedtest():
...
@@ -120,7 +110,19 @@ class InfluxdbSpeedtest():
:param server: Server to test against
:param server: Server to test against
"""
"""
log
.
info
(
'
Starting Speed Test For Server %s
'
,
server
)
log
.
info
(
'
Starting Speed Test For Server %s
'
,
server
)
try
:
self
.
setup_speedtest
(
server
)
self
.
setup_speedtest
(
server
)
except
speedtest
.
NoMatchedServers
:
log
.
error
(
'
No matched servers: %s
'
,
server
)
return
except
speedtest
.
ServersRetrievalError
:
log
.
critical
(
'
Cannot retrieve speedtest.net server list. Aborting
'
)
return
except
speedtest
.
InvalidServerIDType
:
log
.
error
(
'
%s is an invalid server type, must be int
'
,
server
)
return
log
.
info
(
'
Starting download test
'
)
log
.
info
(
'
Starting download test
'
)
self
.
speedtest
.
download
()
self
.
speedtest
.
download
()
log
.
info
(
'
Starting upload test
'
)
log
.
info
(
'
Starting upload test
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment