-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef292c4
commit 0bc825d
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*** O presente exemplo de código visa verificar a velocidade da conexão local com a internet através da biblioteca Speedtest da Linguagem Python. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import speedtest as st | ||
|
||
def Speed_Test(): | ||
test = st.Speedtest() | ||
|
||
down_speed = test.download() | ||
down_speed = round(down_speed / 10**6, 2) | ||
print(f"Velocidade de download: {down_speed} Mbps") | ||
|
||
up_speed = test.upload() | ||
up_speed = round(up_speed / 10**6, 2) | ||
print(f"Velocidade de upload: {up_speed} Mbps") | ||
|
||
ping = test.results.ping | ||
print(f"Latência: {ping} ms") | ||
|
||
Speed_Test() |