51 Commits

Author SHA1 Message Date
Colin Cross
52f6ba9a9d Move SystemPerfTest out of java.* namespace
dx doesn't like classes in the java.* namespace unless it is compiling
a core library.  Move SystemPerfTest to
android.perftests.SystemPerfTest.

Test: builds
Change-Id: I24951d2c9a71d8bb873763d1ccd2f1a67f2be64e
2017-02-28 10:44:04 -08:00
Andrei Stingaceanu
ab18567419 AutoSize TextView (part 11) - fix final APIs
* public attr "autoSizeText" becomes "autoSizeTextType"
  (inlined with all other methods and naming)
* documentation for autoSizetextType "uniform" re-worked:
  "The TextView scales text size both horizontally and
  vertically to fit  within the container"
* converted comments into Javadoc for
  TextView#AUTO_SIZE_TEXT_TYPE_NONE and
  TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM
* better documented attr "autoSizePresetSizes" to specify
  it is a resource array of dimensions
* various small fixes in comments

Bug: 35755149
Bug: 35763485
Bug: 35764658
Bug: 32221168
Test: run cts-dev -m CtsWidgetTestCases -t \
      android.widget.cts.TextViewTest

Change-Id: I36afd399e005521b6e85922aa9e1e4418bb960e1
2017-02-27 15:17:46 +00:00
Andrei Stingaceanu
fbfead24c2 AutoSize TextView (part 9) - sanitize APIs naming
This CL is no-op (cosmetics only)
* renames autoSizeText type "xy" to "uniform"
* renames attribute "autoSizeStepSizeSet" to "autoSizePresetSizes"
* renames "AUTO_SIZE_TEXT_TYPE_XY" to "AUTO_SIZE_TEXT_TYPE_UNIFORM"
* renames public TextView#getAutoSizeTextPresetSizes() to public
  TextView#getAutoSizeTextAvailableSizes() because this method can
  return either preset sizes or computed sizes (via min/max/step)

Bug: 34923754
Bug: 32221168
Test: associated test renames in the same topic
Change-Id: Ifacccf21ca014b6c0a07322fa02b7859ee53e387
2017-02-09 15:30:02 +00:00
Paul Duffin
1d0244a846 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: If507b641624a2933e722f61e815890fcdf442265
2017-01-20 09:00:33 +00:00
Chris Craik
fc29424a3c CriticalNative for RenderNode and DisplayListCanvas
Bug: 33460152
Test:  adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

- Also FastNative for setDisplayList, simplifying upcall into field setter.

- Also removes depth sweep parameter for ViewShowHideTests for now, they're not
providing much extra info.

Together with Outline/Path CL, about 25% faster visibility toggles

960MHz Bullhead Before (prior to Outline/Path CL):

$ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min
INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=743505
INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=332420
INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=354154
INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=1106095
INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1261290
INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=356153
INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=362149

After (this CL + Outline/Path CL):

$ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min
INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=636061
INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=267481
INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=289433
INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=976827
INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1207286
INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=286148
INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=292834

Change-Id: Iaddfa9550bdbab807c662595d005126d98cdc277
2016-12-15 11:30:08 -08:00
Chris Craik
2414e1b051 Outline & Path perf improvements
Bug: 33460152
Test: device boots, ViewShowHidePerfTests#add[Factory:NestedLinearLayoutTree,depth:6] 770us -> 650us (userdebug 960MHz bullhead)

Improve perf for outline & simple path methods

native_methodName -> nMethodName in Path.java

Change-Id: Id2374bbaca3256d2e4f19dae9abe67f794a171b3
2016-12-13 16:52:08 -08:00
Chris Craik
7a5ad26406 Merge "Add Outline/RenderNode perf tests" 2016-12-12 21:15:09 +00:00
Chris Craik
2cbbd8d3ab Add Outline/RenderNode perf tests
Bug: 33460152
Test: benchmark CL. Ran new benchmarks.

Change-Id: I6ad5fb3b72c731ef0fb57654191c4b9ac3f6922d
2016-12-09 19:15:53 -08:00
Chris Craik
3f7c6adeef Add benchmarks for different ways to show/hide view subtrees
Bug: 33460152
Test: benchmark CL. Ran new benchmarks.

Change-Id: I7bdd8988543df821eee7b608ea439dfcf54464e5
2016-12-09 16:21:18 -08:00
Andrei Stingaceanu
0178c2392b AutoSize TextView (part 2) - benchmark number of sizes
Performance test for the number of sizes to choose from
when autosizing.

Tests for 5, 10, 50, 100, 300, 500, 1000, 10000 and
100000!!! different sizes.

Bug: 32740812
Bug: 32221168
Test: this is the test
Change-Id: I611bbf659e51d0236a2ddafb2e2498165cea07a0
2016-11-29 11:51:04 +00:00
John Reck
b2264c2bc5 Add int[] JNI benchmarks
Test: Ran benchmarks
Change-Id: I5faf4236a431199976abb0719c56904dabbbf54d
2016-11-21 16:15:05 -08:00
John Reck
55fe2695a0 Merge "Add more complex View inflation bench" 2016-11-17 22:06:27 +00:00
John Reck
24e98b7667 Add more complex View inflation bench
Test: ran ViewPerfTest#testTwelveKeyInflate

Change-Id: I644e1f77fa1108dcd2d54216d1e740b112a2e21b
2016-11-17 09:03:31 -08:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
John Reck
3acf0382da Add benchmarks for View inflation
Also speed up RenderNode creation:

Use finalizer() instead of NativeAllocationRegistry, this
shaves ~3us off of creation currently

Avoid instanceof, instead have SurfaceView explicitly ask
for updates.

Remove unused method call.

Test: ran benchmarks
Change-Id: I3117fdf72313a4e6a9965baca9f2a8b855c19b34
2016-11-02 14:49:51 -07:00
John Reck
60bf972d48 Merge "Fix pause/resume timing" 2016-10-18 20:27:41 +00:00
John Reck
306928c49d Port Parcel benchmarks to APCT
Test: ran benchmarks
Change-Id: I5b4fad7e1183c8634df4f02bd71701b37fdbc3be
2016-10-17 15:29:17 -07:00
John Reck
c1d6ba4053 Fix pause/resume timing
Test: run SystemPerfTest#testPauseResumeOverhead

Change-Id: Icc34355e29f3a6ba8f7d73a904bf549d2685eee4
2016-10-17 13:49:16 -07:00
John Reck
295f9af9a8 Add a couple simple canvas benchmarks
Test: Manual, run the benchmark

Change-Id: I944b0e958e5df800f493af9e41a6202308301fc1
2016-10-14 14:57:52 -07:00
John Reck
62e5fea855 Greatly reduce BenchmarkState overhead
CL reduces BenchmarkState to minimal levels. It also adds
a warmup loop to get things going first before starting measurements.

With this change with clocks /not/ locked on bullhead the test for
RenderNodeJniOverhead is showing a stable (0ns std dev) result
of 54ns, which is approximately the expected amount.

Test: Ran a few perf benchmarks

Change-Id: If01e455884711ebd9cfb89f076efa19dc0b5436d
2016-10-13 08:41:35 -07:00
TreeHugger Robot
82d9e15a8f Merge "Switch APCT Perf test to JUnit 4.11 friendly" 2016-10-12 18:01:31 +00:00
Teng-Hui Zhu
578f47149d Switch APCT Perf test to JUnit 4.11 friendly
b/31928255

Test: run LayoutPerfTest VectorDrawablePerfTest before and after the change
      data is consistent.

Change-Id: I30de1f09b1df571479009048d621fef57b94f316
2016-10-11 15:39:05 -07:00
Seigo Nonaka
eb22e31f7f Introduce Typeface.createXX performance tests.
BUG:29142734
Test: Performed following commands
mmma -j1024 ./frameworks/base/apct-tests/perftests/core/
adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk
adb shell am instrument -w \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

Change-Id: I8e5ef3bf729f981d20dc88736d8a1a3d6b972c55
2016-10-03 19:58:02 +09:00
Sudheer Shanka
42ed497416 Merge "Add usermanager related perf tests - part2" 2016-09-24 01:12:01 +00:00
Seigo Nonaka
36e0f12892 Fix test failure due to out of UI thread runnning.
After Ie8c42d60a0bff7636795a958a475058798061fe5,
ActivityTestRule is no longer a subclass of UiThreadTestRule, and looks
like the new UiThreadTest annotation is not working for Parameterized
test. As a temporary fix, use runOnUiThread instead of @UiThreadTest.

Change-Id: I69d035864259c1f0765d52ebc53634d3ef8ef84a
2016-09-16 12:13:30 +09:00
Sudheer Shanka
2c4522cc1b Add usermanager related perf tests - part2
- Add onLockedBootComplete callback to UserSwitchObserver.

Bug: 30948225
Test: adb shell am instrument -e class android.multiuser.UserLifecycleTest -w com.android.perftests.multiuser/android.support.test.runner.AndroidJUnitRunner
Change-Id: I87533094805a81fbd85d4f492e637b3304ecd5e2
2016-09-08 13:30:34 -07:00
Keisuke Kuroyanagi
fe1a3b6f03 Merge changes from topic 'ksk_long_text_edit'
* changes:
  Always redraw text that protrude from line bounds.
  Lazy RenderNode creation to improve performance.
2016-09-08 04:37:17 +00:00
Keisuke Kuroyanagi
9612120965 Merge "Edit long text performance test." 2016-09-08 04:37:17 +00:00
Keisuke Kuroyanagi
f5af4a344e Always redraw text that protrude from line bounds.
With I63af3a6ecbf92, we create RenderNode lazily, but
blocks containing contents that protrude from line top or
bottom cannot be simply lazily redrawn after edit or
scroll.
With this CL, we check if the contents protrude from line
top or bottom by comparing the text bounds with relevant
font metrics values and we always redrawn such blocks after
edit or scroll.

Bug: 27889485
Change-Id: I666da5eeb39f780c341597f347bfcba21eb34295
2016-09-05 17:45:37 +09:00
Teng-Hui Zhu
022113ad0d Workaround the issue that parameterized test don't support @UiThreadTest
When the test infrastructure support it, this change should be reverted.
b/30746303

Change-Id: Ice181d93f4f1210bcd2c8566e61c90035fe12ec5
2016-08-30 15:06:28 -07:00
Teng-Hui Zhu
17e76971a1 Move RenderNodePerfTest to the merged package
Change-Id: I4eaa1cf058a83d6c9fbbde2bd97d9638c1152ae8
2016-08-30 13:44:30 -07:00
John Reck
70b70a6f86 Merge "Merge & fix package names" 2016-08-26 20:40:01 +00:00
John Reck
7a9a4eca14 Merge & fix package names
Merge core, graphics, and misc into one
test suite as the split is unneccessary.

Also cleans up package names

Change-Id: I82da6cd69b3a52c63770465780ac98628af334ca
2016-08-26 09:43:03 -07:00
John Reck
395e9b8db2 Modernize RenderNode JNI
Change-Id: I455271647f01f3ac8ceb73359a51a2d2720fdd47
2016-08-24 15:55:27 -07:00
Chris Craik
793075b317 Merge "Add misc apct perf tests" 2016-08-24 22:46:54 +00:00
Sudheer Shanka
53c23fdd5c Add usermanager related perf tests - part1
Bug: 30948225
Change-Id: I0668a012435e9954729e5085fdb4b1f5ce422d97
2016-08-19 16:36:23 -07:00
Keisuke Kuroyanagi
b7ff1333fe Edit long text performance test.
Bug: 27889485

Change-Id: I5784c79fe8b291476f5f76b2760cc2d9fd7d9011
2016-08-19 23:05:02 +09:00
Chris Craik
51dd1e51ec Add misc apct perf tests
Includes test for Log.d(), and System.nanoTime().

Also unifies Android.mk format, and package usage.

Change-Id: I90039eff1c2c2d59afe75c4a808a29b67f3176f3
2016-08-17 17:14:34 -07:00
Seigo Nonaka
586a36e23c Introduce TextPaint.measureText performance tests.
Bug: 29142734
Change-Id: I0e3d14fe8be728d47223d16316a628ebb25f834f
2016-08-09 18:41:52 +09:00
Teng-Hui Zhu
2c33e3085d Double check the layout test running on UI thread
Change-Id: I7628040868ab1cc047c2f891d91c88ab01815c9d
2016-07-12 16:10:45 -07:00
Tenghui Zhu
19c6ae310c Merge "Add layout perf test into APCT" 2016-07-12 20:41:59 +00:00
Teng-Hui Zhu
a9cebd628c Add layout perf test into APCT
Change-Id: I32971176cdf60e8848180f2c923ca2f88fc19e4d
2016-07-12 10:52:49 -07:00
Seigo Nonaka
2219797b95 Merge "Introduce backspace benchmark tests." 2016-07-12 04:21:19 +00:00
TreeHugger Robot
1ff16d36e1 Merge "Introduce Paint.hasGlyph performance tests." 2016-07-07 07:45:17 +00:00
Seigo Nonaka
2a154e2940 Introduce backspace benchmark tests.
Bug: 29142734
Change-Id: I186a2019e883881ee8001848f4ae2076ed551f5b
2016-07-07 15:50:26 +09:00
Seigo Nonaka
f0b5aaba1c Introduce Paint.hasGlyph performance tests.
Bug: 29142734
Change-Id: I0209af2a9378130de2c0297578f8ab8900cacbb4
2016-07-07 14:57:51 +09:00
Seigo Nonaka
e3f1762c35 Add cursor movement perftest.
Bug: 29142734
Change-Id: Ia2c140f676ed78754d6dc819ac49d19f8f0b8ba2
2016-07-01 13:55:04 +09:00
Teng-Hui Zhu
119265d05e Use new Rule to report status when success
b/28980976

Change-Id: Ib5e718ca8bfa2753eedcc40d41843f202c8c23cb
2016-06-27 14:07:00 -07:00
Teng-Hui Zhu
57fc7599e8 Update VectorDrawablePerfTest to use JUnit 4
Merge StubActivity into utils.
b/28980976

Change-Id: I2ea53d5b6e3e508b2f83846940dc617f1fdff248
2016-06-22 15:43:45 -07:00
Teng-Hui Zhu
4cbaff6be1 Create BitmapUtils class for performance apct tests
b/28980976

Change-Id: I3c625f336b6e89352b3906244479da184858cc83
2016-06-22 14:11:37 -07:00