Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug at perf_module #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion PAT-post-processing/perf_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down