Skip to content

Commit

Permalink
Use indices in report
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed May 5, 2017
1 parent 8ad9ca0 commit ee41f37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ocelot/report.py
Expand Up @@ -21,9 +21,10 @@ def read_json_log(fp):
def jsonize(data):
"""Convert some values to JSON strings and do a few other manipulations"""
_ = lambda x: json.dumps(x, ensure_ascii=False)
data['count_labels'] = _([x[0] for x in data['counts']])
# data['count_labels'] = _([x[0] for x in data['counts']])
data['count_labels'] = [str(x) for x, _ in enumerate(data['counts'])]
data['count_data'] = _([x[1] for x in data['counts']])
data['time_labels'] = _([x[0] for x in data['times']])
data['time_labels'] = [str(x) for x, _ in enumerate(data['times'])]
data['time_data'] = _([x[1] for x in data['times']])
for k, v in data['functions'].items():
if hasattr(v, "tabledata"):
Expand Down

0 comments on commit ee41f37

Please sign in to comment.