Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16c42861 authored by Cole Faust's avatar Cole Faust Committed by Android (Google) Code Review
Browse files

Revert "Add --apply-only to benchmarks"

This reverts commit f50f73f9.

Reason for revert: Breaks all benchmarks on ci with `AttributeError: 'Options' object has no attribute 'apply_only'. Did you mean: 'ApplyOnly'?`

Change-Id: I060cb40901a9ea348c80c24d6d9bf574545ce36f
parent f50f73f9
Loading
Loading
Loading
Loading
+2 −17
Original line number Diff line number Diff line
@@ -382,16 +382,12 @@ class Runner():

        # Preroll builds
        for i in range(benchmark.preroll):
            if not self._options.ApplyOnly():
            ns = self._run_build(lunch, benchmark_log_dir.joinpath(f"pre_{i}"), benchmark)
            report.preroll_duration_ns.append(ns)

        sys.stderr.write(f"PERFORMING CHANGE: {benchmark.change.label}\n")
        if not self._options.DryRun():
            benchmark.change.change()
            if self._options.ApplyOnly():
                sys.stderr.write(f"NOT UNDOING CHANGE: {benchmark.change.label}\n")
                return
        try:

            # Measured build
@@ -568,8 +564,6 @@ benchmarks:
                            help="Benchmarks to run.  Default suite will be run if omitted.")
        parser.add_argument("--list", action="store_true",
                            help="list the available benchmarks.  No benchmark is run.")
        parser.add_argument("--apply-only", action="store_true",
                            help="apply the change only, and then exit. Intended only for debugging.")
        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.")
@@ -591,12 +585,6 @@ benchmarks:
        if self._args.dist_one and len(self.Benchmarks()) != 1:
            self._error("--dist-one requires exactly one --benchmark.")

        # --apply-only forces --iterations=1
        if self.apply_only:
            self.iterations = 1
            if self.dist_one:
              self._error("--dist-one cannot be used with --apply-only.")

        if self._had_error:
            raise FatalError()

@@ -642,9 +630,6 @@ benchmarks:
    def Tag(self):
        return self._args.tag

    def ApplyOnly(self):
        return self._args.apply_only

    def DryRun(self):
        return self._args.dry_run