Re-enables reading settings from device_config.
See: I6b7ab56e4015448ee068deb49e7f6fa133fea53c
Updates tests.
Updates documentation.
Bug: 129934185
Test: atest android.view.textclassifier
Test: (Performance) Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
Compare performance results with ConfigParser.ENABLE_DEVICE_CONFIG
set to true vs false. Trivial regression recorded i.e. 1.03x.
Test: (Manual) Change flags and see them reflected. e.g.
adb shell cmd device_config put textclassifier system_textclassifier_enabled false
Verify that app no longer uses the OEM TCS but the AOSP TC.
Change-Id: I4c6ff781c97fc2e3d3da55dc49123fa1d759670a
The key used in Typeface.Builder is different from the key used in
findFromCache method. The problem is key generation in Typeface.Builder
since the key should be created from requested parameters not the actual
font styles.
Here is the raw performance differences on walleye-userdebug
android.graphics.perftests.TypefaceCreatePerfTest(us):
createFromResources: 248 -> 23: (-225, -90.7%)
Bug: 131167183
Test: manually collected perf test result.
Change-Id: Idea25095979707ac84b7f4bc1ede0c2daefd6127
This helps us to evaluate the fix.
BUG: 129695635
Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
Change-Id: I7d2d019faecb3721c044a43e24d86d98a08be64b
So, other tests in other package no longer affect us.
Currently, TextClassifierPerfTest is not run continuously because of
failures in other packages.
BUG: 129695635
Test: Run run.sh
Change-Id: I2253360d98404608193b53c8b34611c2ff1b231e
Creates two new MultiUserPerfTests, timing how long it takes to switch
to a pre-existing user, one for when the user is already-started, and
the other for when it is stopped.
Bug: 126745587
Test: make MultiUserPerfTests && adb install -r ${ANDROID_PRODUCT_OUT}/data/app/MultiUserPerfTests/MultiUserPerfTests.apk && adb shell am instrument -e class android.multiuser.UserLifecycleTests -w com.android.perftests.multiuser/androidx.test.runner.AndroidJUnitRunner
Change-Id: I734f4971ad992e906a0090f4ef328255ab2a0349
Creates a profile, starts it, stops it, then restarts it, timing how
long the restart takes. This gives an indication of how long it takes to
start a previously-initialized profile, and mimics toggling
setQuietModeEnabled.
Right now, this process is especially slow due to
RoleManagerService.onStartUser(), so it is worthwhile tracking this.
Bug: 129415917
Test: atest android.multiuser.UserLifecycleTests#managedProfileUnlock_stopped
Change-Id: Ic7f3bdb6fa7daaab53cb23dbf8e8a68e293d23b2
We want to not use WestWorld's diffing so that we can apply thresholds
on the diffs. This is further explained in the KernelCpuThreadReaderDiff
documentation.
Test: atest KernelCpuThreadReaderDiffTest
Bug: 129387487
Change-Id: I638ae92a28236830444dc80e470114a0e23d79a4
This includes (as well as nits by IntelliJ):
- Removing getCurrentProcessCpuUsage, as it was only used in tests
- Updating class documentation
- Adding @Presubmit annotations to tests
- Reformat using google-java-format
Test: atest KernelCpuThreadReaderTest
Change-Id: I710773043b9e9ef40545c20667fe2f79e9915e43
In the future, we think the TextClassifier is going to run in an
external process. This CL moves the getLocalTextClassifier() API so
that we don't have to guarantee this to apps.
OEMs implementing TextClassifierServices however will want access to
this API so this CL effectively moves the the API from where apps
typically look for a TC (we prefer apps to call getTextClassifier()
instead) to where TCS implementations are most likely to be accessing
such APIs. The method is also renamed appropriately to what it will be
long term (i.e. the default TC implementation rather than as the local
TC).
Bug: 123681286
Test: atest core/tests/coretests/src/android/view/textclassifier
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts
Test: adb shell am instrument -w -e class android.textclassifier.TextClassifierPerfTest com.android.perftests.core/androidx.test.runner.AndroidJUnitRunner
Change-Id: I685e2b5263ffddbe301256fc2ed0d6254c3357ed
Reason:
We are more interested in the performance of the textclassifier in
AOSP, rather than AiAi
Test: adb shell am instrument -w -e class android.textclassifier.TextClassifierPerfTest com.android.perftests.core/androidx.test.runner.AndroidJUnitRunner
Change-Id: I00ccc1c4fb5c5469e029d2f70474ddbab65a5732
Settings include:
- Number of buckets
- UID predicate for which threads to collect data for
Test: to test UID selection: `atest KernelCpuThreadReaderTest`
Test: to test settings application: `adb shell cmd settings put ...` and
manual inspection of `pull-source`
Bug: 123562450
Change-Id: I9d97dfc1c120fcf1b04dadb6ce24863afeff053c
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