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

Commit eac5c5a1 authored by Olivier Gaillard's avatar Olivier Gaillard
Browse files

Add perf tests for binder calls to measure sampling performance.

Test: should I test my test?
Change-Id: Ia96e33966567ffd32c9c50a0d88b82bf4abb21b8
parent 11eedb63
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);