Fix string bug in webapp

Tracked-On: #7820
Signed-off-by: Matthew Leon <matthew.leon@intel.com>
This commit is contained in:
Matthew Leon 2022-07-07 13:24:13 -07:00 committed by acrnsi-robot
parent dcb01e1de2
commit 0e0bf3321f

View File

@ -48,8 +48,7 @@ def create_hist():
#Setup the figure and save it #Setup the figure and save it
figure = plt.hist(dataset) figure = plt.hist(dataset)
#plt.title("Latencies where count = " + str(total_count)) plt.title("Latency percentages")
plt.title("Latencies percentages")
plt.xlabel("Latency Value (ms)") plt.xlabel("Latency Value (ms)")
plt.ylabel("Frequency") plt.ylabel("Frequency")
plt.savefig("hist.png") plt.savefig("hist.png")
@ -76,7 +75,7 @@ def transform_data(data_string):
#Transform the data into a list that can be fed to matplotlib #Transform the data into a list that can be fed to matplotlib
for i in range(0, int(len(data_percentages) / 2)): for i in range(0, int(len(data_percentages) / 2)):
transformed_data_values += ([data_values[i*2]] * data_values[i*2 + 1]) transformed_data_values += ([int(data_percentages[i*2])] * int(data_percentages[i*2 + 1]))
return transformed_data_values return transformed_data_values