This is the framework used by other system component like autofill.
We will use this to answer system health question.
We can also monitor the metric in this dashboard once it is submitted.
https://blackbox.googleplex.com/#/custom/fw_other
Result in pixel2 eng build (unit: nano second)
(We will have more accurate result in the dashboard, we are advised not to run perf test
in eng build)
android.textclassifier.TextClassifierPerfTest:INSTRUMENTATION_STATUS: detectLanguage[size=0]_mean=15010771
INSTRUMENTATION_STATUS: detectLanguage[size=0]_median=15203514
INSTRUMENTATION_STATUS: detectLanguage[size=0]_min=10497747
INSTRUMENTATION_STATUS: detectLanguage[size=0]_standardDeviation=3061947
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: suggestConversationActions[size=0]_mean=39863316
INSTRUMENTATION_STATUS: suggestConversationActions[size=0]_median=41535711
INSTRUMENTATION_STATUS: suggestConversationActions[size=0]_min=35979326
INSTRUMENTATION_STATUS: suggestConversationActions[size=0]_standardDeviation=3297779
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: detectLanguage[size=10]_mean=14711781
INSTRUMENTATION_STATUS: detectLanguage[size=10]_median=13608035
INSTRUMENTATION_STATUS: detectLanguage[size=10]_min=12184472
INSTRUMENTATION_STATUS: detectLanguage[size=10]_standardDeviation=3144018
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: suggestConversationActions[size=10]_mean=43076381
INSTRUMENTATION_STATUS: suggestConversationActions[size=10]_median=43618067
INSTRUMENTATION_STATUS: suggestConversationActions[size=10]_min=38747603
INSTRUMENTATION_STATUS: suggestConversationActions[size=10]_standardDeviation=3502977
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: detectLanguage[size=100]_mean=20646733
INSTRUMENTATION_STATUS: detectLanguage[size=100]_median=20766674
INSTRUMENTATION_STATUS: detectLanguage[size=100]_min=19184218
INSTRUMENTATION_STATUS: detectLanguage[size=100]_standardDeviation=892559
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: suggestConversationActions[size=100]_mean=42126088
INSTRUMENTATION_STATUS: suggestConversationActions[size=100]_median=43709436
INSTRUMENTATION_STATUS: suggestConversationActions[size=100]_min=36636031
INSTRUMENTATION_STATUS: suggestConversationActions[size=100]_standardDeviation=4863678
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: detectLanguage[size=1,000]_mean=21721753
INSTRUMENTATION_STATUS: detectLanguage[size=1,000]_median=22690096
INSTRUMENTATION_STATUS: detectLanguage[size=1,000]_min=16252464
INSTRUMENTATION_STATUS: detectLanguage[size=1,000]_standardDeviation=3445673
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: suggestConversationActions[size=1,000]_mean=45968389
INSTRUMENTATION_STATUS: suggestConversationActions[size=1,000]_median=47465009
INSTRUMENTATION_STATUS: suggestConversationActions[size=1,000]_min=39389483
INSTRUMENTATION_STATUS: suggestConversationActions[size=1,000]_standardDeviation=3820288
INSTRUMENTATION_STATUS_CODE: -1
Test: Run commands below
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.textclassifier.TextClassifierPerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
adb shell cmd package compile -m speed -f com.android.perftests.core;
Change-Id: Ia2c746f48ed018269a230422a695caca05844a12
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