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

Commit 909042e9 authored by Siim Sammul's avatar Siim Sammul Committed by Android (Google) Code Review
Browse files

Merge "Enable binder latency collection from system_server for dogfood." into sc-dev

parents 31cb707f f95c09e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class BinderCallsStats implements BinderInternal.Observer {
    public static final boolean DEFAULT_TRACK_SCREEN_INTERACTIVE = false;
    public static final boolean DEFAULT_TRACK_DIRECT_CALLING_UID = true;
    public static final boolean DEFAULT_IGNORE_BATTERY_STATUS = false;
    public static final boolean DEFAULT_COLLECT_LATENCY_DATA = false;
    public static final boolean DEFAULT_COLLECT_LATENCY_DATA = true;
    public static final int MAX_BINDER_CALL_STATS_COUNT_DEFAULT = 1500;
    private static final String DEBUG_ENTRY_PREFIX = "__DEBUG_";

+2 −10
Original line number Diff line number Diff line
@@ -938,17 +938,9 @@ public class BinderCallsStatsTest {
    }

    @Test
    public void testLatencyCollectionDisabledByDefault() {
    public void testLatencyCollectionEnabledByDefault() {
        TestBinderCallsStats bcs = new TestBinderCallsStats();
        assertEquals(false, bcs.getCollectLatencyData());

        Binder binder = new Binder();
        CallSession callSession = bcs.callStarted(binder, 1, WORKSOURCE_UID);
        bcs.time += 10;
        bcs.elapsedTime += 20;
        bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE, WORKSOURCE_UID);

        assertEquals(0, bcs.getLatencyObserver().getLatencyHistograms().size());
        assertEquals(true, bcs.getCollectLatencyData());
    }

    private static class TestHandler extends Handler {