✨
This commit is contained in:
@ -1,49 +1,105 @@
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
def laptop_single_listener():
|
||||
plt.figure()
|
||||
plt.rcParams.update({'font.size':22})
|
||||
|
||||
def single_listener():
|
||||
fig, (ax1,ax2) = plt.subplots(1,2)
|
||||
|
||||
x = [1,10,100,1000]
|
||||
y1 = [0.00068,0.0047,0.045,00.63]
|
||||
y2 = [0.00530,2.1000,7.200,17.00]
|
||||
y3 = [0.00210,0.1800,0.860,05.60]
|
||||
|
||||
plt.plot(x, y2, label="Maximum")
|
||||
plt.plot(x, y3, label="Average")
|
||||
plt.plot(x, y1, label="Minimum")
|
||||
y11 = [0.00068,0.0047,0.045,00.63]
|
||||
y12 = [0.00530,2.1000,7.200,17.00]
|
||||
y13 = [0.00210,0.1800,0.860,05.60]
|
||||
|
||||
plt.legend()
|
||||
plt.grid()
|
||||
ax1.plot(x, y12, label="Maximum", linewidth=5)
|
||||
ax1.plot(x, y13, label="Average", linewidth=5)
|
||||
ax1.plot(x, y11, label="Minimum", linewidth=5)
|
||||
|
||||
plt.xlabel("Event count")
|
||||
plt.ylabel("Time (Laptop)")
|
||||
ax1.legend()
|
||||
ax1.grid(linewidth=2)
|
||||
ax1.set_title("Laptop")
|
||||
|
||||
plt.xscale("log")
|
||||
plt.yscale("log")
|
||||
ax1.set_xlabel("Event count")
|
||||
ax1.set_ylabel("Time")
|
||||
|
||||
plt.savefig("performance_results/laptop_single_listener.png")
|
||||
ax1.set_xscale("log")
|
||||
ax1.set_yscale("log")
|
||||
|
||||
###
|
||||
|
||||
y21 = [0.0004,0.003,0.025,00.24]
|
||||
y22 = [0.0022,1.000,2.200,16.00]
|
||||
y23 = [0.0016,0.056,0.440,05.20]
|
||||
|
||||
ax2.plot(x, y22, label="Maximum", linewidth=5)
|
||||
ax2.plot(x, y23, label="Average", linewidth=5)
|
||||
ax2.plot(x, y21, label="Minimum", linewidth=5)
|
||||
|
||||
ax2.legend()
|
||||
ax2.grid(linewidth=2)
|
||||
ax2.set_title("Desktop")
|
||||
|
||||
ax2.set_xlabel("Event count")
|
||||
ax2.set_ylabel("Time")
|
||||
|
||||
ax2.set_xscale("log")
|
||||
ax2.set_yscale("log")
|
||||
|
||||
fig.set_figheight(12)
|
||||
fig.set_figwidth(25)
|
||||
fig.set_dpi(100)
|
||||
|
||||
fig.savefig("performance_results/single_listener.png")
|
||||
|
||||
def multiple_listeners():
|
||||
fig, (ax1,ax2) = plt.subplots(1,2)
|
||||
|
||||
def laptop_multiple_listeners():
|
||||
plt.figure()
|
||||
x = [1,10,100,1000]
|
||||
y1 = [00.63,00.46,00.42,00.92]
|
||||
y2 = [17.00,25.00,20.00,03.24]
|
||||
y3 = [05.60,07.60,07.10,01.49]
|
||||
|
||||
plt.plot(x, y2, label="Maximum")
|
||||
plt.plot(x, y3, label="Average")
|
||||
plt.plot(x, y1, label="Minimum")
|
||||
y11 = [00.63,00.46,00.42,00.92]
|
||||
y12 = [17.00,25.00,20.00,03.24]
|
||||
y13 = [05.60,07.60,07.10,01.49]
|
||||
|
||||
plt.legend()
|
||||
plt.grid()
|
||||
ax1.plot(x, y12, label="Maximum", linewidth=5)
|
||||
ax1.plot(x, y13, label="Average", linewidth=5)
|
||||
ax1.plot(x, y11, label="Minimum", linewidth=5)
|
||||
|
||||
plt.xlabel("Listener count")
|
||||
plt.ylabel("Time (Laptop)")
|
||||
ax1.legend()
|
||||
ax1.grid(linewidth=2)
|
||||
ax1.set_title("Laptop")
|
||||
|
||||
plt.xscale("log")
|
||||
plt.yscale("log")
|
||||
ax1.set_xlabel("Listener count")
|
||||
ax1.set_ylabel("Time")
|
||||
|
||||
plt.savefig("performance_results/laptop_multiple_listeners.png")
|
||||
ax1.set_xscale("log")
|
||||
ax1.set_yscale("log")
|
||||
|
||||
###
|
||||
|
||||
y21 = [00.24,00.24,00.25,0.38]
|
||||
y22 = [16.00,19.00,10.00,0.42]
|
||||
y23 = [05.20,04.00,01.00,0.4]
|
||||
|
||||
ax2.plot(x, y12, label="Maximum", linewidth=5)
|
||||
ax2.plot(x, y13, label="Average", linewidth=5)
|
||||
ax2.plot(x, y11, label="Minimum", linewidth=5)
|
||||
|
||||
ax2.legend()
|
||||
ax2.grid(linewidth=2)
|
||||
ax2.set_title("Desktop")
|
||||
|
||||
ax2.set_xlabel("Listener count")
|
||||
ax2.set_ylabel("Time")
|
||||
|
||||
ax2.set_xscale("log")
|
||||
ax2.set_yscale("log")
|
||||
|
||||
fig.set_figheight(12)
|
||||
fig.set_figwidth(25)
|
||||
fig.set_dpi(100)
|
||||
|
||||
fig.savefig("performance_results/multiple_listeners.png")
|
||||
|
||||
if __name__ == "__main__":
|
||||
laptop_single_listener()
|
||||
laptop_multiple_listeners()
|
||||
single_listener()
|
||||
multiple_listeners()
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB |
BIN
src/performance_results/multiple_listeners.png
Normal file
BIN
src/performance_results/multiple_listeners.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
BIN
src/performance_results/single_listener.png
Normal file
BIN
src/performance_results/single_listener.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 153 KiB |
Reference in New Issue
Block a user