diff --git a/PAT-post-processing/perf_module.py b/PAT-post-processing/perf_module.py index 77f6d02..f66eb35 100644 --- a/PAT-post-processing/perf_module.py +++ b/PAT-post-processing/perf_module.py @@ -95,7 +95,11 @@ def extract_data(self): def normalize(self, cpu_obj): """Look up %idle inside the cpu for the same timestamp and normalize \ sum of cycles""" - idle_dict = dict(zip(cpu_obj.time_stamp_array, cpu_obj.idle_percent)) + time_stamp_set = set(cpu_obj.time_stamp_array) + idle_dict = {} + for time_stamp in time_stamp_set: + index = cpu_obj.time_stamp_array.index(time_stamp) + idle_dict[time_stamp] = cpu_obj.idle_percent[index] for self.ind, self.row in enumerate(self.data_array): try: self.ts = int(self.row[1])