This is intended to be the first of multiple performance tests around
ActivityManager.
This also refactors some of the existing performance utils so that a
BenchmarkState which accepts the elapsed time rather than measures it
can be added (ManualBenchmarkState).
This test measures the current time, sends a Broadcast, the target APK
receives it, measures the current time, and sends its measured time
back to the test APK.
Test: m ActivityManagerPerfTestsTestApp ActivityManagerPerfTests
Test: adb install $OUT/data/app/ActivityManagerPerfTestsTestApp/ActivityManagerPerfTestsTestApp.apk
Test: adb install $OUT/data/app/ActivityManagerPerfTests/ActivityManagerPerfTests.apk
Test: adb shell am instrument -w -e class \
com.android.frameworks.perftests.am.tests.BroadcastPerfTest \
com.android.frameworks.perftests.amtests/android.support.test.runner.AndroidJUnitRunner
Bug: 67460485
Change-Id: Ib1606ff60c6a845088bde5bd1a33294765b88b36
Also speed up RenderNode creation:
Use finalizer() instead of NativeAllocationRegistry, this
shaves ~3us off of creation currently
Avoid instanceof, instead have SurfaceView explicitly ask
for updates.
Remove unused method call.
Test: ran benchmarks
Change-Id: I3117fdf72313a4e6a9965baca9f2a8b855c19b34
CL reduces BenchmarkState to minimal levels. It also adds
a warmup loop to get things going first before starting measurements.
With this change with clocks /not/ locked on bullhead the test for
RenderNodeJniOverhead is showing a stable (0ns std dev) result
of 54ns, which is approximately the expected amount.
Test: Ran a few perf benchmarks
Change-Id: If01e455884711ebd9cfb89f076efa19dc0b5436d
b/31928255
Test: run LayoutPerfTest VectorDrawablePerfTest before and after the change
data is consistent.
Change-Id: I30de1f09b1df571479009048d621fef57b94f316
Relocate everything into apct-tests/
Setup the share static java lib for the common code and use it.
b/28980976
Change-Id: I74c80c0b54ad18ee5fc44da43249d3c88fb926e2