Bug 1834501 Add a --clear-cache flag to mach-try-perf r=perftest-reviewers,aglavic

Differential Revision: https://phabricator.services.mozilla.com/D184093
This commit is contained in:
Alex Finder 2023-07-24 14:52:55 +00:00
parent 2d05ffea78
commit e1114b2802
3 changed files with 15 additions and 0 deletions

View File

@ -27,6 +27,7 @@ The tool is built to be conservative about the number of tests to run, so if you
Select specific platforms to target. Android only available with --android. Available platforms: android-a51, android,
windows, linux, macosx, desktop
--apps [ [ ...]] Select specific applications to target from: firefox, chrome, chromium, geckoview, fenix, chrome-m, safari
--clear-cache Deletes the try_perf_revision_cache file
task configuration arguments:
--artifact Force artifact builds where possible.

View File

@ -27,6 +27,7 @@ The tool is built to be conservative about the number of tests to run, so if you
Select specific platforms to target. Android only available with --android. Available platforms: android-a51, android,
windows, linux, macosx, desktop
--apps [ [ ...]] Select specific applications to target from: firefox, chrome, chromium, geckoview, fenix, chrome-m, safari
--clear-cache Deletes the try_perf_revision_cache file
task configuration arguments:
--artifact Force artifact builds where possible.

View File

@ -276,6 +276,14 @@ class PerfParser(CompareParser):
"metavar": "",
},
],
[
["--clear-cache"],
{
"action": "store_true",
"default": False,
"help": "Deletes the try_perf_revision_cache file",
},
],
[
["--extra-args"],
{
@ -1125,6 +1133,7 @@ class PerfParser(CompareParser):
query=None,
detect_changes=False,
rebuild=1,
clear_cache=False,
**kwargs,
):
# Setup fzf
@ -1134,6 +1143,10 @@ class PerfParser(CompareParser):
print(FZF_NOT_FOUND)
return 1
if clear_cache:
print(f"Removing cached {cache_file} file")
cache_file.unlink(missing_ok=True)
all_tasks, dep_cache, cache_dir = setup_tasks_for_fzf(
not dry_run,
parameters,