204 Commits

Author SHA1 Message Date
Abodunrinwa Toki
0634af3875 Lazy-load textclassifier settings.
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
2019-05-02 12:55:58 +01:00
Seigo Nonaka
37d181673b Fix performance regression by fixing keys used in Typeface.Builder
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
2019-04-23 13:21:27 -07:00
Tony Mak
751afc9821 Add getTextClassifier perf test
This helps us to evaluate the fix.

BUG: 129695635

Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh

Change-Id: I7d2d019faecb3721c044a43e24d86d98a08be64b
2019-04-04 17:09:58 +01:00
TreeHugger Robot
117d17b96f Merge "MultiUserPerfTest - test restart profile" 2019-04-03 22:03:51 +00:00
TreeHugger Robot
12294a48ad Merge "MultiUserPerfTest test switch to pre-existing user" 2019-04-03 21:34:44 +00:00
Misha Wagner
ab922b13cd Merge "Add diffing to KernelCpuThreadReader" 2019-04-02 13:19:49 +00:00
Tony Mak
c78069aef7 Fix AndroidTest.xml
Test: Run run.sh

Change-Id: If9f088dccacd30313380bedba4f8731ca6b47477
2019-04-01 22:59:38 +00:00
Tony Mak
e5ee70516e Move TextClassifierPerfTest to a separate package
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
2019-04-01 21:15:57 +01:00
Bookatz
52b12ac7a1 MultiUserPerfTest test switch to pre-existing user
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
2019-03-29 10:46:09 -07:00
Bookatz
57908d9f2e MultiUserPerfTest - test restart profile
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
2019-03-29 10:40:10 -07:00
Misha Wagner
2487d357a1 Add diffing to KernelCpuThreadReader
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
2019-03-27 10:58:42 +00:00
Misha Wagner
3989eb02bc Clean up KernelCpuThreadReader
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
2019-03-20 11:19:21 +00:00
TreeHugger Robot
3d61f89275 Merge "Address API council feedback" 2019-02-25 19:21:52 +00:00
John Reck
e57475e6c9 Address API council feedback
Bug: 125027187
Bug: 125026102
Bug: 125026678
Bug: 125026234
Bug: 125027586
Bug: 125026476
Bug: 125026103
Bug: 125026237
Bug: 125027248
Bug: 125026475
Bug: 125027487
Test: RenderNodeTests
Change-Id: Ic63ea7a3cfe359a7dff0c1b46e534e499f7e928b
2019-02-22 14:24:28 -08:00
Sudheer Shanka
c7dc355feb Merge "Don't change the order of test results." 2019-02-22 18:31:07 +00:00
TreeHugger Robot
4cac1f42f0 Merge "Move TextClassifier.getLocalTextClassifier() API." 2019-02-20 16:40:21 +00:00
Sasha Smundak
500db62bfa Convert Android.mk file to Android.bp
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I23d8d5a019155a0f3296f7ab75e9b44b7621f3c8
2019-02-19 13:46:51 -08:00
Misha Wagner
dc5beb50c8 Merge "Add KernelCpuThreadReader minimium CPU usage threshold" 2019-02-13 10:31:15 +00:00
Abodunrinwa Toki
324572e747 Move TextClassifier.getLocalTextClassifier() API.
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
2019-02-12 20:56:58 +00:00
Misha Wagner
648d20359f Add KernelCpuThreadReader minimium CPU usage threshold
Configurable using KernelCpuThreadReaderSettingsObserver.

Test: atest KernelCpuThreadReaderTest#testReader_filtersLowUsage
Change-Id: I92bb5fbee6b56bff00c61f359e8281966e2882c1
2019-02-12 11:05:29 +00:00
Tony Mak
ca7433e2da Use local textclassifier in perf test
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
2019-02-11 17:13:40 +00:00
Sudheer Shanka
f69fc9c445 Don't change the order of test results.
Test: atest apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
Change-Id: Ie21030581ae81509eaa5b3ec31d5e6978dcb23d4
2019-02-11 00:23:29 -08:00
Misha Wagner
3bca79c932 Merge "Add settings for KernelCpuThreadReader" 2019-02-01 10:44:12 +00:00
Misha Wagner
4b32c9fbe9 Add settings for KernelCpuThreadReader
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
2019-01-30 16:24:00 +00:00
TreeHugger Robot
c7410ea130 Merge "Fix the test format." 2019-01-29 16:18:12 +00:00
gopinath
dcf274b3ce Fix the test format.
Remove "=" sign.

Change-Id: If989e3f6d2e9a67cf1ded9e1fd30d017782a5cd6
2019-01-28 14:46:55 -08:00
Tony Mak
91daa15eea Rename PERSON_USER_LOCAL and PERSON_USER_REMOTE
Test: atest TextClassificationManagerTest.java
Bug: 123223181

Change-Id: I077d06aabf96d824942b99dd6ab95fe8adc2641f
2019-01-25 12:07:50 +00:00
KOUSHIK PANUGANTI
412796e584 Migrate frameworks/base/apct-tests/perftests/core to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I16a302b5ea2b0b18cdac0a407040df641a36fe1b
2019-01-08 11:33:52 +00:00
TreeHugger Robot
3b07fcbfc5 Merge "Migrate frameworks/base/apct-tests/perftests/autofill to androidx.test" 2019-01-04 02:34:12 +00:00
TreeHugger Robot
d3cb31d66a Merge "Migrate frameworks/base/apct-tests/perftests/utils to androidx.test" 2019-01-04 00:28:14 +00:00
KOUSHIK PANUGANTI
511606f5da Migrate frameworks/base/apct-tests/perftests/utils to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I2fd63c13d298e9651566171837d14cc30d05850e
2018-12-17 14:53:34 -08:00
KOUSHIK PANUGANTI
130f0a5c48 Migrate frameworks/base/apct-tests/perftests/multiuser to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I73fc89de69f1eb54896a2dc19cf93b22bc4f049d
2018-12-17 14:41:06 -08:00
koushik panuganti
936589160e Migrate frameworks/base/apct-tests/perftests/autofill to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: Ia4540aaf2eadedd9c1a9702ae8cfeb120da53e88
2018-12-17 11:46:51 -08:00
Tony Mak
c8ccab6840 Add performance test for suggestConversationActions and detectLanguage
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
2018-12-13 22:32:37 +08:00
Olivier Gaillard
76c231d0d8 Sets ThreadLocalWorkSource to authorized work source.
Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: I4995c35eed87154312e5e560716d66b3fc2ae221
2018-12-11 15:43:19 +00:00
Seigo Nonaka
1debe9a305 Add test case for different text direction.
Bug: 113635044
Test: StaticLayoutPerfTest
Change-Id: I74f42bfc25aff25bfc1783ad0977b92526c87ef6
2018-11-16 09:10:00 -08:00
Seigo Nonaka
d39ded7376 Fix TextViewPRecomputedTextPerfTest
Bug: N/A
Test: manually
Change-Id: I22c135b246ce288f1729b1622e4307d68af6b61a
2018-11-09 17:03:37 -08:00
Kweku Adams
53de12ef0d Merge "Slight improvements to ArraySet." 2018-11-02 22:28:48 +00:00
Kweku Adams
65b5ee346d Slight improvements to ArraySet.
1. There are cases where valueAt could return null even though the given
index was out of bounds. I've added a check for that in the code.
2. The default implementation of Collection.removeIf() uses the
iterator(). This change avoids that since the iterator is an inefficient
way to access the array contents.

Benchmark tests. Note that these times are in nanoseconds:

Before:

INSTRUMENTATION_STATUS: removeIf_Small_Base_mean=163679
INSTRUMENTATION_STATUS: removeIf_Small_Base_median=158215
INSTRUMENTATION_STATUS: removeIf_Small_Base_min=129564
INSTRUMENTATION_STATUS: removeIf_Small_Base_standardDeviation=24779
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_mean=5645195
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_median=5584964
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_min=5448560
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_standardDeviation=206915
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_mean=1316514
INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_median=1282442
INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_min=1216533
INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_standardDeviation=109087
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_Base_mean=571712
INSTRUMENTATION_STATUS: removeIf_Large_Base_median=566500
INSTRUMENTATION_STATUS: removeIf_Large_Base_min=535726
INSTRUMENTATION_STATUS: removeIf_Large_Base_standardDeviation=26374
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_mean=946
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_median=896
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_min=841
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_standardDeviation=106
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_mean=2196954
INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_median=2163910
INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_min=2136283
INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_standardDeviation=91149
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_mean=356644
INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_median=350376
INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_min=337067
INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_standardDeviation=17354
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_mean=1044645
INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_median=1040981
INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_min=1010144
INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_standardDeviation=35016
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_mean=507561
INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_median=503419
INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_min=471564
INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_standardDeviation=33141
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_mean=300889
INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_median=295486
INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_min=282948
INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_standardDeviation=19869
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: valueAt_InBounds_mean=644
INSTRUMENTATION_STATUS: valueAt_InBounds_median=584
INSTRUMENTATION_STATUS: valueAt_InBounds_min=528
INSTRUMENTATION_STATUS: valueAt_InBounds_standardDeviation=141
INSTRUMENTATION_STATUS_CODE: -1

After:

INSTRUMENTATION_STATUS: removeIf_Small_Base_mean=143926
INSTRUMENTATION_STATUS: removeIf_Small_Base_median=145985
INSTRUMENTATION_STATUS: removeIf_Small_Base_min=125700
INSTRUMENTATION_STATUS: removeIf_Small_Base_standardDeviation=11112
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_mean=5173581
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_median=5168995
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_min=5108405
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_Negative_standardDeviation=45739
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_mean=695812
INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_median=690070
INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_min=679793
INSTRUMENTATION_STATUS: removeIf_Large_RemoveHalf_standardDeviation=17959
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_Base_mean=591815
INSTRUMENTATION_STATUS: removeIf_Large_Base_median=588499
INSTRUMENTATION_STATUS: removeIf_Large_Base_min=573707
INSTRUMENTATION_STATUS: removeIf_Large_Base_standardDeviation=14348
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_mean=4010666
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_median=4017245
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_min=3970170
INSTRUMENTATION_STATUS: valueAt_OutOfBounds_EdgeCase_standardDeviation=28577
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_mean=734297
INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_median=732576
INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_min=720065
INSTRUMENTATION_STATUS: removeIf_Large_RemoveAll_standardDeviation=14906
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_mean=195026
INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_median=194430
INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_min=190400
INSTRUMENTATION_STATUS: removeIf_Small_RemoveHalf_standardDeviation=4012
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_mean=772914
INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_median=785834
INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_min=737947
INSTRUMENTATION_STATUS: removeIf_Large_RemoveNothing_standardDeviation=23808
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_mean=194325
INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_median=196492
INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_min=186998
INSTRUMENTATION_STATUS: removeIf_Small_RemoveAll_standardDeviation=5091
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_mean=187122
INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_median=187292
INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_min=182272
INSTRUMENTATION_STATUS: removeIf_Small_RemoveNothing_standardDeviation=4902
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: valueAt_InBounds_mean=918
INSTRUMENTATION_STATUS: valueAt_InBounds_median=919
INSTRUMENTATION_STATUS: valueAt_InBounds_min=801
INSTRUMENTATION_STATUS: valueAt_InBounds_standardDeviation=80
INSTRUMENTATION_STATUS_CODE: -1

Perf test command:
mmma -j ./frameworks/base/apct-tests/perftests/core/;
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk;
adb shell cmd package compile -m speed -f com.android.perftests.core;
adb shell am instrument -w -e class android.util.ArraySetPerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

Bug: 118339123
Bug: 117846754
Test: atest android.util.cts.ArraySetTest
and benchmark tests (see above)
Change-Id: Ic4b10fd2bbc7a745ca4e4029ca4829847812fabe
2018-11-01 17:39:35 -07:00
TreeHugger Robot
3875001f59 Merge "Add missing endRecording calls" 2018-10-30 23:57:23 +00:00
John Reck
f401c7e8f5 Add missing endRecording calls
StaticLayoutPerfTest was previously leaking
display lists. RenderNode now notices and yells
about that, exposing this bug

Change-Id: If85c85211a115a4af09edf2a215415fd0d2d0b4b
Fixes: 118650198
Test: this
2018-10-30 10:50:41 -07:00
Misha Wagner
566903ab47 Add class to read per-thread CPU usage from proc filesystem
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
2018-10-30 10:48:27 +00:00
TreeHugger Robot
815aa66d3c Merge "Update some docs & tweak some method names" 2018-10-27 00:24:59 +00:00
John Reck
c7ddcf390f Update some docs & tweak some method names
Test: builds
Change-Id: Id0e5cf6fdb3a391136a1d314498f75e0b954ceeb
2018-10-26 13:57:12 -07:00
Seigo Nonaka
f307adc83e Do not pass context to minikin in case of Canvas.drawText
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
2018-10-26 10:31:33 -07:00
Olivier Gaillard
8a3e20a76c Update BinderCallsStats perf tests to use a more realistic workload.
Test: this is a test
Change-Id: I6dc7151c3df2a1e488db7d1b703ca29049b2e01a
2018-10-25 16:46:59 +01:00
John Reck
8884cfc13e Merge "Rename & package shuffle" 2018-10-23 20:02:00 +00:00
Olivier Gaillard
e2693cb9ca Perf test to measure various mechanisms to track CPU.
Change-Id: I84cac933c62b03421632a7321a40526d9d3884cf
Test: this is a test
2018-10-08 13:52:46 +01:00
John Reck
32f140aa67 Rename & package shuffle
Rename DisplayListCanvas -> RecordingCanvas
Move RecordingCanvas to android.graphics
Move RenderNode to android.graphics

Bug: 112709971
Test: make & boot
Change-Id: Iddeb6a89f8923ea81a1f37bbee4e9b1db8ede238
2018-10-04 16:18:12 -07:00
Marcin Oczeretko
1003f75bc4 Add perf tests for LooperStats
Test: n/a
Change-Id: I97e290398ca67d3fda0ffeae723c2cb2d0bc10f3
2018-09-06 10:55:03 +01:00