In [27]:
#Query response time per result
import matplotlib.pyplot as plt
import numpy as np
d1= [7349, 10864, 6443, 5945, 10664, 7673, 6651, 7270, 9796, 6138]
d2 = [7300, 6830, 7014, 8643, 6104, 9976, 7150, 7998, 5951, 6029]
data = [d1,d2]
fig = plt.figure(1, figsize=(9, 6))
ax = fig.add_subplot(111)
ax.set_title('Query response time per result', y=1.05)
ax.set_xlabel('Amount of results returned')
ax.set_ylabel('Time (Milliseconds)')
plt.boxplot(data)
plt.show()
In [26]:
#Query response time per query
import matplotlib.pyplot as plt
import numpy as np
d1= [4976, 7802, 6556, 5201, 6050, 6761, 5197, 7807, 7299, 5638]
d2 = [18825, 13182, 15579, 14515, 12799, 12462, 14227, 29575, 13035, 15219]
d3 = [20403, 20870, 20715, 18128, 22268, 20390, 20371, 23613, 18494, 18557]
data = [d1,d2, d3]
fig = plt.figure(1, figsize=(9, 6))
ax = fig.add_subplot(111)
ax.set_title('Query response time per query', y=1.05)
ax.set_xlabel('Amount of queries made')
ax.set_ylabel('Time (Milliseconds)')
plt.boxplot(data)
plt.show()
In [25]:
#Regression
x = [1, 2, 3]
y = [6328.7, 15941.8, 20380.9]
m,b = np.polyfit(x, y, 1)
print(m)
print(b)
In [ ]: