Skip to content

Commit

Permalink
Featuring Multiple Column Support for Post Processing to Export Data
Browse files Browse the repository at this point in the history
- For babelstream we need multiple columns to be exported so with this change,
- the post-processing script would be able to recognise new column data alongside with x_axis and y_axis
- If needed user could define a_axis, b_axis, etc. to export more columns and the default execution flow is not affected.
  • Loading branch information
kaanolgu committed Jan 23, 2024
1 parent ed45fd2 commit fd2e03a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions post-processing/post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ def run_post_processing(self, log_path, config):
raise FileNotFoundError(errno.ENOENT, "Could not find a valid perflog in path", log_path)

# get axis columns
columns = [config["x_axis"]["value"], config["y_axis"]["value"]]
if config["x_axis"]["units"].get("column"):
columns.insert(1, config["x_axis"]["units"]["column"])
if config["y_axis"]["units"].get("column"):
columns.append(config["y_axis"]["units"]["column"])
columns = []
axis_string = "axis"
for key in config:
if axis_string in key:
columns.append(config[key]["value"])
if config[key]["units"].get("column"):
columns.append(config[key]["units"]["column"])

series = config["series"]
# extract series columns and filters
Expand Down Expand Up @@ -583,7 +585,6 @@ def read_perflog(path):
df.insert(index, "test_name", [r[0] for r in results])
# drop old column
df.drop("display_name", axis=1, inplace=True)

# replace other columns with dictionary contents
dict_cols = [c for c in ["extra_resources", "env_vars"] if c in df.columns]
for col in dict_cols:
Expand Down

0 comments on commit fd2e03a

Please sign in to comment.