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

Commit 0bafc61d authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Add interval for relayout perf test" into sc-v2-dev am: 724ba144 am: 8214cd30

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15390768

Change-Id: Id07236c953731fdd39350619825a47b873c3b82d
parents 4febde82 8214cd30
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.app.Activity;
import android.content.Context;
import android.graphics.Point;
import android.os.RemoteException;
import android.os.SystemClock;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.PerfTestActivity;
@@ -124,6 +125,12 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
    }

    private static class RelayoutRunner {
        /**
         * There may be some messages post to other threads with holding WM lock after relayout.
         * Let it take a break to avoid lock contention that isn't the scope of this test.
         */
        private static final long INTERVAL_MS = 10;

        final ClientWindowFrames mOutFrames = new ClientWindowFrames();
        final MergedConfiguration mOutMergedConfiguration = new MergedConfiguration();
        final InsetsState mOutInsetsState = new InsetsState();
@@ -158,6 +165,9 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
                        mViewVisibility.getAsInt(), mFlags, mFrameNumber, mOutFrames,
                        mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls,
                        mOutSurfaceSize);
                state.pauseTiming();
                SystemClock.sleep(INTERVAL_MS);
                state.resumeTiming();
            }
        }
    }