Bar Charts
This commit is contained in:
@@ -121,7 +121,7 @@ def memory_utilisation_in_Gbps(connection):
|
||||
# This function calculates the memory utilisation in Gbit/s considering the memory_utilisation_percent_new function result.
|
||||
maxDataRate = maximum_data_rate(connection)
|
||||
memoryPercent = memory_utilisation_percent_new(connection)
|
||||
return (memoryPercent/100)*(maxDataRate/1024)
|
||||
return (memoryPercent/100)*(maxDataRate/1000)
|
||||
|
||||
|
||||
@metric
|
||||
|
||||
@@ -62,7 +62,7 @@ def memory_utilisation_window(connection):
|
||||
bandwidthPercentage[i] = windowSize
|
||||
# print(bandwidthPercentage[i])
|
||||
bandwidthPercentage[i] = float(bandwidthPercentage[i]/windowSize)
|
||||
bandwidth[i] = float(bandwidthPercentage[i])*float(maxDataRate)/1024
|
||||
bandwidth[i] = float(bandwidthPercentage[i])*float(maxDataRate)/1000
|
||||
bandwidthPercentage[i] *= 100
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
@@ -72,7 +72,7 @@ def memory_utilisation_window(connection):
|
||||
time = np.arange(0, steps*windowSize, windowSize)
|
||||
|
||||
plt.figure(1)
|
||||
plt.plot(time/1000, bandwidthPercentage)
|
||||
plt.bar(time/1000, bandwidthPercentage, width = windowSize/1000)
|
||||
plt.xlabel('Time (ns)')
|
||||
plt.ylabel('Bandwidth (%)')
|
||||
plt.ylim(0, 120)
|
||||
@@ -82,7 +82,7 @@ def memory_utilisation_window(connection):
|
||||
windowPercentage.close()
|
||||
|
||||
plt.figure(2)
|
||||
plt.plot(time/1000, bandwidth)
|
||||
plt.bar(time/1000, bandwidth, width = windowSize/1000)
|
||||
plt.xlabel('Time (ns)')
|
||||
plt.ylabel('Bandwidth (Gbit/s)')
|
||||
plt.grid(True)
|
||||
|
||||
Reference in New Issue
Block a user