Skip to content

Commit

Permalink
Add the possibility to add a label for the caption along with --path
Browse files Browse the repository at this point in the history
  • Loading branch information
aurianer committed Oct 31, 2024
1 parent 3e333fa commit d56b4bc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,13 @@ def parse_jobs(data_dirs, distinguish_dir=False):
if not isinstance(data_dirs, list):
data_dirs = [data_dirs]
data = []
for data_dir in data_dirs:
bench_name_postfix = os.path.basename(os.path.dirname(data_dir))
for data_dir_label in data_dirs:
dir_label = data_dir_label.split(":")
data_dir = dir_label[0]
if len(dir_label) == 2:
bench_name_postfix = dir_label[1]
else:
bench_name_postfix = os.path.basename(os.path.dirname(data_dir))
if os.path.basename(data_dir) == "d":
bench_name_postfix += "-double"
elif os.path.basename(data_dir) == "z":
Expand Down Expand Up @@ -390,7 +395,9 @@ def parse_jobs_cmdargs(description):
parser.add_argument(
"--path",
action="append",
help="Plot results from this directory. You can pass this option several times.",
help="Plot results from this directory. You can pass this option several times. \
Optional: --path=<path>:<label> to specify the label displayed in the \
caption of the plot (label associated with the results in <path>).",
)
parser.add_argument(
"--distinguish-dir",
Expand Down

0 comments on commit d56b4bc

Please sign in to comment.