Skip to content

Commit

Permalink
Update converter script function calls to use named arguments to impr…
Browse files Browse the repository at this point in the history
…ove code readbility
  • Loading branch information
weilinwa committed Oct 2, 2024
1 parent 250e024 commit c6f0c2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/create_perf_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ def append_to_desc(s: str):

jo.append(j)

def extract_metric_json(self, events, pmu_prefix, ignore, jo, infoname, aux,issue_to_metrics):
def extract_metric_json(self, events, pmu_prefix, ignore, jo, infoname, aux, issue_to_metrics):
print(self.files['extra metrics'])
with open(self.files['extra metrics'], 'r') as extra_json:
broken_metrics = {
Expand Down Expand Up @@ -1064,7 +1064,7 @@ def extract_metric_json(self, events, pmu_prefix, ignore, jo, infoname, aux,issu
self.save_form(em['MetricName'], em['MetricGroup'], form,
em['BriefDescription'], em.get('PublicDescription'),
None, em.get('ScaleUnit'), threshold, [], events,
infoname, aux, pmu_prefix, jo, issue_to_metrics, True)
infoname, aux, pmu_prefix, jo, issue_to_metrics, from_json=True)


def extract_tma_metrics(self, csvfile: TextIO, pmu_prefix: str,
Expand Down Expand Up @@ -1664,7 +1664,7 @@ def resolve(v: str) -> str:
_verboseprint2(f'{i.name} -> {threshold}')
self.save_form(i.name, i.groups, form, i.desc, None, i.locate, i.scale_unit,
threshold, i.issues, events, infoname, aux, pmu_prefix, jo,
issue_to_metrics, False)
issue_to_metrics, from_json=False)

if 'Socket_CLKS' in infoname:
form = 'Socket_CLKS / #num_dies / duration_time / 1000000000'
Expand All @@ -1674,7 +1674,7 @@ def resolve(v: str) -> str:
self.save_form('UNCORE_FREQ', 'SoC', formula.ToPerfJson(),
'Uncore frequency per die [GHZ]', None, None, None, None, [],
events, infoname, aux, pmu_prefix, jo,
issue_to_metrics, False)
issue_to_metrics, from_json=False)

if 'extra metrics' in self.files:
self.extract_metric_json(events, pmu_prefix, ignore, jo, infoname, aux,issue_to_metrics)
Expand Down

0 comments on commit c6f0c2f

Please sign in to comment.