summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
author Joe Onorato <joeo@google.com> 2024-01-02 07:32:54 +0000
committer Joe Onorato <joeo@google.com> 2024-01-02 16:36:31 -0800
commit60c36ade0fed9afce4f38e79c162fb34f4441f58 (patch)
tree372dd88e1809245b5ce34205348cd43d5ab22f1a /tools
parenta79329678d03f9fc438c584e877d098855178101 (diff)
dist-one flag should be a boolean, not a string
Test: th Change-Id: I99a22011518b4a7a7f506b93d6a5ac9c7c4a2ef5
Diffstat (limited to 'tools')
-rwxr-xr-xtools/perf/benchmarks4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/benchmarks b/tools/perf/benchmarks
index f46b920463..df4c87b3b2 100755
--- a/tools/perf/benchmarks
+++ b/tools/perf/benchmarks
@@ -460,7 +460,7 @@ benchmarks:
parser.add_argument("--benchmark", nargs="*", default=[b.id for b in self._benchmarks],
metavar="BENCHMARKS",
help="Benchmarks to run. Default suite will be run if omitted.")
- parser.add_argument("--dist-one", type=str,
+ parser.add_argument("--dist-one", action="store_true",
help="Copy logs and metrics to the given dist dir. Requires that only"
+ " one benchmark be supplied. Postroll steps will be skipped.")
@@ -478,7 +478,7 @@ benchmarks:
self._error(f"Invalid benchmark: {id}")
# --dist-one requires that only one benchmark be supplied
- if len(self.Benchmarks()) != 1:
+ if self._args.dist_one and len(self.Benchmarks()) != 1:
self._error("--dist-one requires that exactly one --benchmark.")
if self._had_error: