|
|
|
|
@ -1,6 +1,10 @@
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
import mysql.connector
|
|
|
|
|
# matplotlib.use('tkAgg')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def Average(lst):
|
|
|
|
|
return sum(lst) / len(lst)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# mariadb
|
|
|
|
|
mariadbConnection = mysql.connector.connect(
|
|
|
|
|
@ -21,13 +25,7 @@ for i in mariadbResult:
|
|
|
|
|
downloads.append(i[2])
|
|
|
|
|
uploads.append(i[3])
|
|
|
|
|
|
|
|
|
|
# Python program to get average of a list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def Average(lst):
|
|
|
|
|
return sum(lst) / len(lst)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("i = ", len(times))
|
|
|
|
|
print("avg ping = ", Average(pings), " ms")
|
|
|
|
|
print("avg download = ", Average(downloads) / 1000000, " mbit/s")
|
|
|
|
|
print("avg upload = ", Average(uploads) / 1000000, " mbit/s")
|
|
|
|
|
|