177 Commits

Author SHA1 Message Date
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
Marcin Oczeretko
c80c81a516 Extract CachedDeviceState from BinderCallsStats
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
2018-09-06 10:54:55 +01:00
Aurimas Liutikas
64ec5b84b9 Add a simple benchmark for getting view attributes from Theme_Material.
Test: atest CorePerfTests:ResourcesThemePerfTest
Change-Id: I228273c8b83ebfee73c478f72ceec42d3f81a53b
2018-08-23 15:10:27 -07:00
Aurimas Liutikas
3f26befd10 Add a basic ResourcePerfTest.
Moving ResourcesBenchmark.java to the proper android.perftests infrastructure.

Test: ran the benchmark locally.
Change-Id: Ia981274e1e3c167a2a8900498fc40b7a03508a74
2018-08-03 14:37:27 -07:00
Olivier Gaillard
86714d1347 Add support for battery/screen state changes.
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
2018-08-01 21:03:59 +01:00
Olivier Gaillard
b80d30d887 Improve the performance tests.
The original tests would only run 5 iterations per test.

Test: unit test
Change-Id: I221129b44e81d4b8dc7151185104af8515a04b29
2018-07-31 19:56:40 +00:00
Olivier Gaillard
eac5c5a189 Add perf tests for binder calls to measure sampling performance.
Test: should I test my test?
Change-Id: Ia96e33966567ffd32c9c50a0d88b82bf4abb21b8
2018-07-31 09:43:28 +00:00
Olivier Gaillard
289ba40237 Adds an Observer interface to observes binder API calls.
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
2018-07-25 21:20:59 +00:00
Olivier Gaillard
2c13c6f37b Binder calls stats - random sampling.
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
2018-07-23 17:39:22 +01:00
Siyamed Sinir
301cda906f Disable hyphen for TextView perf test
Test: atest  CorePerfTests:TextViewSetTextMeasurePerfTest
Bug: 78350836
Change-Id: I83ed7dc29180a010f67e0dc181e1e2e35c25e849
2018-07-22 12:52:15 -07:00
John Reck
d5a9dc06be Expose async & counter publicly
Also add some go-faster to the JNI

Before:
android.os.TracePerfTest:INSTRUMENTATION_STATUS: enabled_mean=13
INSTRUMENTATION_STATUS: enabled_median=13
INSTRUMENTATION_STATUS: enabled_min=13
INSTRUMENTATION_STATUS: enabled_standardDeviation=0
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: beginEndSection_mean=3849
INSTRUMENTATION_STATUS: beginEndSection_median=3850
INSTRUMENTATION_STATUS: beginEndSection_min=3829
INSTRUMENTATION_STATUS: beginEndSection_standardDeviation=14
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: counter_mean=1836
INSTRUMENTATION_STATUS: counter_median=1837
INSTRUMENTATION_STATUS: counter_min=1832
INSTRUMENTATION_STATUS: counter_standardDeviation=2
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: asyncBeginEnd_mean=4992
INSTRUMENTATION_STATUS: asyncBeginEnd_median=4988
INSTRUMENTATION_STATUS: asyncBeginEnd_min=4964
INSTRUMENTATION_STATUS: asyncBeginEnd_standardDeviation=21
INSTRUMENTATION_STATUS_CODE: -1

After:
android.os.TracePerfTest:INSTRUMENTATION_STATUS: enabled_mean=13
INSTRUMENTATION_STATUS: enabled_median=13
INSTRUMENTATION_STATUS: enabled_min=13
INSTRUMENTATION_STATUS: enabled_standardDeviation=0
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: beginEndSection_mean=2974
INSTRUMENTATION_STATUS: beginEndSection_median=2971
INSTRUMENTATION_STATUS: beginEndSection_min=2958
INSTRUMENTATION_STATUS: beginEndSection_standardDeviation=15
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: counter_mean=1737
INSTRUMENTATION_STATUS: counter_median=1739
INSTRUMENTATION_STATUS: counter_min=1732
INSTRUMENTATION_STATUS: counter_standardDeviation=3
INSTRUMENTATION_STATUS_CODE: -1
.INSTRUMENTATION_STATUS: asyncBeginEnd_mean=3677
INSTRUMENTATION_STATUS: asyncBeginEnd_median=3679
INSTRUMENTATION_STATUS: asyncBeginEnd_min=3663
INSTRUMENTATION_STATUS: asyncBeginEnd_standardDeviation=11
INSTRUMENTATION_STATUS_CODE: -1

Test: builds, benchmarks, verified tracing still works
Bug: 111503982
Change-Id: I71cb026d034bf9b9f97427d10d5ff9ce3d103561
2018-07-17 14:35:01 +00:00
Siyamed Sinir
09206cd86a Merge "Remove equal sign and comma from some text perf tests" 2018-07-11 01:11:23 +00:00
Siyamed Sinir
099554e2ab Remove equal sign and comma from some text perf tests
Test: atest android.text.BoringLayoutCreateDrawPerfTest
Test: android.text.BoringLayoutIsBoringPerfTest
Test: android.text.StaticLayoutCreateDrawPerfTest
Test: android.text.TextViewSetTextMeasurePerfTest
Test: android.text.PaintMeasureDrawPerfTest

Bug: 111319857
Change-Id: Idb9f24cef0c829e0d7d239554463d92fe8093004
2018-07-10 16:26:07 -07:00
Olivier Gaillard
1d7f615eec Add experiment flag to control binder call stats.
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
2018-07-04 13:36:46 +01:00
TreeHugger Robot
4c51b7c057 Merge "Tweak some RenderNode API surfaces" 2018-06-21 19:05:27 +00:00
Felipe Leme
b251b7f091 Uses autofill callback to throttle performance tests.
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
2018-06-14 10:26:59 -07:00
John Reck
568b2a64f0 Tweak some RenderNode API surfaces
* 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
2018-06-04 17:02:02 -07:00
Olivier Gaillard
58b56e3720 Collect a few more binder stats when detailed tracking is enabled.
Test: unit tested

Change-Id: Ibdbbd2b9b60dbc6fa375d60c76f04d42392d6bd3
2018-06-01 21:25:53 +01:00
TreeHugger Robot
15c6708f23 Merge "Introduce perf test for Layout.getOffsetForHorizontal" 2018-05-17 19:37:08 +00:00
Seigo Nonaka
f6f7314544 Introduce perf test for Layout.getOffsetForHorizontal
Bug: 78464361
Test: atest StaticLayoutGetOffsetForHorizontalPerfTest
Change-Id: I2543463daddf6ab174c14e11705de603d0286690
2018-05-17 11:07:40 -07:00
Dan Willemsen
f97d380ca7 Merge "Convert to Soong" am: acbd94d76f am: b1005a8a2a
am: d00c851e55

Change-Id: I889b5d31535d927b3aa9cf5ad6af955ca0678356
2018-05-15 15:52:51 -07:00
Dan Willemsen
d00c851e55 Merge "Convert to Soong" am: acbd94d76f
am: b1005a8a2a

Change-Id: If5cb26e0669f79240d8fee1d40aaa2162d8e611f
2018-05-15 15:06:19 -07:00
Dan Willemsen
4888b1f6f0 Convert to Soong
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
2018-05-14 16:47:02 -07:00
Felipe Leme
660327dda6 Spun off Autofill PERF tests on its own package...
...so bugs on it (like starving the UI Thread) don't impact other tests

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: 38345816

Change-Id: I76346f1d1c45790788400fcd9765f6b424d99f4c
2018-05-04 11:42:46 -07:00
Felipe Leme
236c626458 Make Autofill PERF tests more lenient to error.
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
2018-05-03 15:44:58 -07:00
Felipe Leme
984cfdf988 New Autofill PERF test that waits for AutofillCallbacks.
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: I60c9061b37c7f1f933740657732825e6edbe665f
2018-05-03 14:16:05 -07:00
Felipe Leme
a052c98fce Removed temporary Autofill PERF tests.
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: Ic37b0b2b0cf4a233cdb0104c86990200ed1ea57c
2018-05-03 10:07:19 -07:00
Felipe Leme
bc90715a1a Minor refactorings on Autofill tests:
- 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
2018-05-02 16:17:58 -07:00