StaticLayoutPerfTest was previously leaking
display lists. RenderNode now notices and yells
about that, exposing this bug
Change-Id: If85c85211a115a4af09edf2a215415fd0d2d0b4b
Fixes: 118650198
Test: this
Reads all thread CPU usage for the current process. This traverses
"/proc/self/task/*/time_in_state" to gather the thread ID and CPU usage
of each child thread. Process name, thread name, and UID are also read from
"/proc" for interpretable data.
Bug: 111534779
Test: Unit test in CpuThreadProcReaderTest
Change-Id: I6c71dde1dfcc9bbb87d95baf0886f9da7a782299
Canvas.drawText don't use context info, just draw the given slice of
text.
By this change the performance for the long text gets back.
android.text.CanvasDrawTextTest
drawText_LongText_SmallWindow : 94,526 us -> 11,268 us
Bug: 111638688
Test: atest CanvasDrawTextTest
Change-Id: I69f8cbf4ff361d213f5d041148dbcc41ebd16c84
Add a service that tracks the device state properties which are
interesting to System Server telemetry services. Allows the services to
share this code and have consistent state information.
Test: Unit tests and manually tested
Change-Id: Ia5c78c45a55414a0c5c46202db2a37283b50a703
Moving ResourcesBenchmark.java to the proper android.perftests infrastructure.
Test: ran the benchmark locally.
Change-Id: Ia981274e1e3c167a2a8900498fc40b7a03508a74
Only collect data when the device is charging to be consistent with what
battery stats is doing.
Add a screen interactive dimension to have more context to analysis the
binder calls data.
Test: unit test
Change-Id: Id31c53ae315d905e5d8e67918f64780f34ff5d72
This is the first step to move BinderCallsStats implementation to the
server package in order to have an implementation more specific to the
system server (tracking charger on/off).
Removes the volatile keywords in BinderCallsStats.
Also exposes a clean API to StatsCompanionService instead of
BinderCallsStats directly.
Test: unit test
Change-Id: Ied98c555acc8489420104098561b4608346509b5
Change the sampling method to be random. The previous mechanism recorded
one call for each key (uid/API name) and every X calls for each key:
- This is biased and will make it to interpret the data from
westworld. It was especially unfair for apps using many different APIs
since the first call to each API was always recorded.
- It uses more memory since we will keep track of all the long tail
Simplify/unify the way we keep track of sampled calls.
Do not estimate the CPU usage of non-recorded calls
long samplesCount = cs.callCount / mPeriodicSamplingInterval + 1;
duration = cs.cpuTimeMicros / samplesCount;
It biases the results, let's use an example with 3 calls: 1ms, 3ms, 5ms
with an sampling interval of 2. With the previous algorithm we would get an
average per call of (1+1+3+2+5)/5=2.4ms. With the new one (1+3+5)/3=3ms.
Test: unit tests
Change-Id: I1dd7eb3c6c631b86a53485bccbfa397882cccc92
For instance, to enabled detailed tracking locally.
adb shell settings put global binder_calls_stats detailed_tracking=true
Also adds the ability to turn off data collection completely and
changing the sampling interval. Uploading data through westworld can
re-use the same flag once implemented.
Test: Unit tested
Change-Id: I808c9902b8124ab643d9b197703d537da040ae3e
Currently the Autofill performance tests work fine, but if we change IAutofillManager
to make oneway binder calls, the tests will crash because of the excessive number of
unfinished binder transactions.
We can fix this issue by using the autofill callbacks that are shown when the UI is shown
or hidden.
Test: mmma -j ./frameworks/base/apct-tests/perftests/autofill/ && \
adb install -r $OUT/data/app/AutofillPerfTests/AutofillPerfTests.apk && \
adb shell am instrument -w -e class android.view.autofill.LoginTest \
com.android.perftests.autofill/android.support.test.runner.AndroidJUnitRunner
Bug: 73536867
Change-Id: I216e67ca97cab059851b0873601e82b368a6abea
* no-arg #start()
* remove no-op #destroy method
* fix a Java-imposed quirk that you can't draw a
currently invalid RenderNode, forcing bottom-up
recording for no particular reason
Test: builds
Change-Id: I28b41c83b4f7f9ddced843b0d57e9ac510d40ae5
See build/soong/README.md for more information.
Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
These tests were based on CTS autofill tests, where correctness is the priority
(for example, there should be no "orphan" onFillRequest() call) and the number
of UI interactions is small.
But that "correctness" model doesn't work well on PERF, because the
onFillRequest() calls are handled in the main thread and the main test loop can
make hundreds of UI calls. For example, if testFocus_autofillUsernameOnly()
doesn't set the ignored id on the password field, each focus on that field would
result in a new onFillRequest(), which is not called right away. As such, the
main loop would finish, but subsequent tests would hang until all those calls
are made.
Test: mmma -j ./frameworks/base/apct-tests/perftests/core/ && \
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk && \
adb shell am instrument -w -e class android.view.autofill.AutofillPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Bug: 38345816
Change-Id: I83a311e719966dcf41e86142952075e68d0c64bf
- Move common code to AbstractAutofillTestCase.
- Copied existing codes to LoginTest, which does not use @Parameters.
- Deprecated AutofillPerfTest (it will be removed once LoginTest has some runs).
- Added some (temporary) no-op tests to help us investigate why some tests are
missing from the dashboard.
Test: mmma -j ./frameworks/base/apct-tests/perftests/core/ && \
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk && \
adb shell am instrument -w -e class android.view.autofill.AutofillPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Bug: 38345816
Change-Id: Iab703205f1e01a1e5413b10c3008aac8efcc5dc2
Resetting it is also fine, but it could accidentally "solve" performance issues
on other tests that are affected by the default service set by the OEM.
Test: mmma -j ./frameworks/base/apct-tests/perftests/core/ && \
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk && \
adb shell am instrument -w -e class android.view.autofill.AutofillPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Bug: 38345816
Change-Id: Ic196ef3140697e64a5feb39f6b5363387fbf0b14
These tests render an activity that has 2 autofillable views (username and
password) and keep changint their values, observing what happens in 4 scenarios:
1. No autofill service (baseline)
2. Autofill service returning no datasets.
3. Autofill service returning a dataset with username and password.
4. Autofill service returning a dataset with just username.
Test: mmma -j ./frameworks/base/apct-tests/perftests/core/ && \
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk && \
adb shell am instrument -w -e class android.view.autofill.AutofillPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Bug: 38345816
Change-Id: Ifeb8d038f90450ebc96fa7d3ffc7d719a11234ce
These tests render an activity that has 2 autofillable views (username and
password) and keep focusing between then, observing what happens in 4 scenarios:
1. No autofill service (baseline)
2. Autofill service returning no datasets.
3. Autofill service returning a dataset with username and password.
4. Autofill service returning a dataset with just username.
Because this change introduced a helper class to run shell commands without
needing the UiAutomator package, it also changed the MultiUserPerfTests to use
such helper.
Test: mmma -j ./frameworks/base/apct-tests/perftests/core/ && \
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk && \
adb shell am instrument -w -e class android.view.autofill.AutofillPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Test: mmma -j ./frameworks/base/apct-tests/perftests/multiuser && \
adb install -r $OUT/data/app/MultiUserPerfTests/MultiUserPerfTests.apk && \
adb shell am instrument -w -e class android.multiuser.UserLifecycleTests \
com.android.perftests.multiuser/android.support.test.runner.AndroidJUnitRunner
Bug: 38345816
Change-Id: Ie283dff8dd19c38ea829de9164b23aae2bfeb015
Enabled collection of number of calls per-uid. It has relatively small
overhead. Memory impact is minimal and cpu overhead is also small -
250 ns vs 1500 ns with detailed tracking
Detailed tracking is disabled by default. Controlled by
persist.sys.binder_calls_detailed_tracking
Added commands to reset and enable/disable detailed stats:
dumpsys binder_calls_stats --reset
dumpsys binder_calls_stats --enable-detailed-tracking
dumpsys binder_calls_stats --disable-detailed-tracking
Test: manual
Bug: 75318418
Change-Id: I7c1280c025001b6d2b46e4a37bad841712b6da2f
Here is an example of test result:
android.text.PrecomputedTextMemoryUsageTest:
MemoryUsage
Arabic Hyphenation : 26,087
Arabic NoHyphenation: 26,087
CJK Hyphenation : 58,515
CJK NoHyphenation : 58,515
Latin Hyphenation : 38,333
Latin NoHyphenation : 16,077
Bug: 72461923
Test: manually
Change-Id: If3df2243cf9901178b3fd34882fb20f499fef5ab
Add them to the suite version of APCT metric instrumentation.
Test: atest CorePerfTests
Bug: 77280599
Change-Id: Ia8f0c44fcb9fd21869ed64e54483aa87556a469d