From 0e0bf3321fe6b5b5f3f514732974610bcf6d5e81 Mon Sep 17 00:00:00 2001 From: Matthew Leon Date: Thu, 7 Jul 2022 13:24:13 -0700 Subject: [PATCH] Fix string bug in webapp Tracked-On: #7820 Signed-off-by: Matthew Leon --- misc/sample_application/uservm/histapp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/sample_application/uservm/histapp.py b/misc/sample_application/uservm/histapp.py index dc4044e3e..d8a07496f 100644 --- a/misc/sample_application/uservm/histapp.py +++ b/misc/sample_application/uservm/histapp.py @@ -48,8 +48,7 @@ def create_hist(): #Setup the figure and save it figure = plt.hist(dataset) - #plt.title("Latencies where count = " + str(total_count)) - plt.title("Latencies percentages") + plt.title("Latency percentages") plt.xlabel("Latency Value (ms)") plt.ylabel("Frequency") 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 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