in generate_side_by_side.py [0:0]
def side_by_side_parser():
parser = argparse.ArgumentParser(
"This tool can be used to generate a side-by-side visualization of two videos. "
"When using this tool, make sure that the `--test-name` is an exact match, i.e. "
"if you are comparing the task `test-linux64-shippable-qr/opt-browsertime-tp6-firefox-linkedin-e10s` "
"between two revisions, then use `browsertime-tp6-firefox-linkedin-e10s` as the suite name "
"and `test-linux64-shippable-qr/opt` as the platform."
)
parser.add_argument(
"--base-revision",
type=str,
required=True,
help="The base revision to compare a new revision to.",
)
parser.add_argument(
"--base-branch",
type=str,
default="autoland",
help="Branch to search for the base revision.",
)
parser.add_argument(
"--new-revision",
type=str,
required=True,
help="The base revision to compare a new revision to.",
)
parser.add_argument(
"--new-branch",
type=str,
default="autoland",
help="Branch to search for the new revision.",
)
parser.add_argument(
"--test-name",
"--base-test-name",
type=str,
required=True,
dest="test_name",
help="The name of the test task to get videos from.",
)
parser.add_argument(
"--new-test-name",
type=str,
default=None,
help="The name of the test task to get videos from in the new revision.",
)
parser.add_argument(
"--platform",
"--base-platform",
type=str,
required=True,
dest="platform",
help="Platform to return results for.",
)
parser.add_argument(
"--new-platform",
type=str,
default=None,
help="Platform to return results for in the new revision.",
)
parser.add_argument(
"--overwrite",
action="store_true",
default=False,
help="If set, the downloaded task group data will be deleted before "
+ "it gets re-downloaded.",
)
parser.add_argument(
"--cold",
action="store_true",
default=False,
help="If set, we'll only look at cold pageload tests.",
)
parser.add_argument(
"--warm",
action="store_true",
default=False,
help="If set, we'll only look at warm pageload tests.",
)
parser.add_argument(
"--most-similar",
action="store_true",
default=False,
help="If set, we'll search for a video pairing that is the most similar.",
)
parser.add_argument(
"--search-crons",
action="store_true",
default=False,
help="If set, we will search for the tasks within the cron jobs as well. ",
)
parser.add_argument(
"--skip-download",
action="store_true",
default=False,
help="If set, we won't try to download artifacts again and we'll "
+ "try using what already exists in the output folder.",
)
parser.add_argument(
"--output",
type=str,
default=os.getcwd(),
help="This is where the data will be saved. Defaults to CWD. "
+ "You can include a name for the file here, otherwise it will "
+ "default to side-by-side.mp4.",
)
parser.add_argument(
"--metric",
type=str,
default="speedindex",
help="Metric to use for side-by-side comparison.",
)
parser.add_argument(
"--vismetPath",
type=str,
default=False,
help="Paths to visualmetrics.py for step chart generation.",
)
parser.add_argument(
"--original",
action="store_true",
default=False,
help="If set, use the original videos in the side-by-side instead "
+ "of the postprocessed videos.",
)
parser.add_argument(
"--skip-slow-gif",
action="store_true",
default=False,
help="If set, the slow-motion GIFs won't be produced.",
)
return parser