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

Commit 234a2cc0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add perf tests for binder calls to measure sampling performance."

parents f3e7b965 eac5c5a1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -68,6 +68,19 @@ public class BinderCallsStatsPerfTest {
        }
    }

    @Test
    public void timeCallSessionOnePercentSampling() {
        mBinderCallsStats.setSamplingInterval(100);
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        Binder b = new Binder();
        int i = 0;
        while (state.keepRunning()) {
            CallSession s = mBinderCallsStats.callStarted(b, i % 100);
            mBinderCallsStats.callEnded(s, 0, 0);
            i++;
        }
    }

    @Test
    public void timeCallSessionTrackingDisabled() {
        mBinderCallsStats.setDetailedTracking(false);