|
|
|
|
@ -1,23 +1,9 @@
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
import sqlite3
|
|
|
|
|
import pandas
|
|
|
|
|
|
|
|
|
|
import matplotlib
|
|
|
|
|
import mysql.connector
|
|
|
|
|
matplotlib.use('tkAgg')
|
|
|
|
|
|
|
|
|
|
# # sqlite3
|
|
|
|
|
# sqlite3Connection = sqlite3.connect("bandwidth.db")
|
|
|
|
|
# sqlQuery = """SELECT times, ping, download, upload FROM bandwidth"""
|
|
|
|
|
# sqlite3Data = pandas.read_sql(sqlQuery, sqlite3Connection)
|
|
|
|
|
|
|
|
|
|
# # plot
|
|
|
|
|
# plt.plot(sqlite3Data.times, sqlite3Data.ping, label="Ping")
|
|
|
|
|
# plt.plot(sqlite3Data.times, sqlite3Data.download, label="Download")
|
|
|
|
|
# plt.plot(sqlite3Data.times, sqlite3Data.upload, label="Upload")
|
|
|
|
|
# plt.legend()
|
|
|
|
|
# plt.title("Bandwidth from sqlite3")
|
|
|
|
|
# plt.show()
|
|
|
|
|
|
|
|
|
|
# mariadb
|
|
|
|
|
mariadbConnection = mysql.connector.connect(
|
|
|
|
|
host="server0", user="root", password="lungretter1", database="bandwidth")
|
|
|
|
|
|