Merge "Add perf tests for binder calls to measure sampling performance."
This commit is contained in:
committed by
Android (Google) Code Review
commit
234a2cc0e9
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user