236 Commits

Author SHA1 Message Date
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
Felipe Leme
15a074393b Added missing @LargeTest annotation.
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: 38345816wip

Change-Id: I0a6f85683ffb3457fe54a05b4b46b273a3b58cec
2018-05-02 07:30:47 -07:00
Felipe Leme
e4d053886b Uses a custom JUnit rule to preserve value of autofill service settings.
Resetting it is also fine, but it could accidentally "solve" performance issues
on other tests that are affected by the default service set by the OEM.

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: Ic196ef3140697e64a5feb39f6b5363387fbf0b14
2018-05-01 13:08:31 -07:00
Felipe Leme
f9dc8d9663 Moar PERF tests for autofill.
These tests render an activity that has 2 autofillable views (username and
password) and keep changint their values, observing what happens in 4 scenarios:

1. No autofill service (baseline)
2. Autofill service returning no datasets.
3. Autofill service returning a dataset with username and password.
4. Autofill service returning a dataset with just username.

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: Ifeb8d038f90450ebc96fa7d3ffc7d719a11234ce
2018-05-01 12:54:53 -07:00
Felipe Leme
6378b48f23 Initial PERF tests for autofill.
These tests render an activity that has 2 autofillable views (username and
password) and keep focusing between then, observing what happens in 4 scenarios:

1. No autofill service (baseline)
2. Autofill service returning no datasets.
3. Autofill service returning a dataset with username and password.
4. Autofill service returning a dataset with just username.

Because this change introduced a helper class to run shell commands without
needing the UiAutomator package, it also changed the MultiUserPerfTests to use
such helper.

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
Test: mmma -j ./frameworks/base/apct-tests/perftests/multiuser && \
  adb install -r $OUT/data/app/MultiUserPerfTests/MultiUserPerfTests.apk && \
  adb shell am instrument -w -e class android.multiuser.UserLifecycleTests \
  com.android.perftests.multiuser/android.support.test.runner.AndroidJUnitRunner

Bug: 38345816

Change-Id: Ie283dff8dd19c38ea829de9164b23aae2bfeb015
2018-05-01 12:40:33 -07:00
Fyodor Kupolov
b0ad3dd2c6 Merge "Enabled aggregated per-uid stats collection by default" into pi-dev am: 981d61ddf8
am: adb9a96b8e

Change-Id: I76eb5d2c94af5138232142ef603f7da6c088b2fa
2018-04-23 11:09:00 -07:00
Fyodor Kupolov
3f3af617ae Enabled aggregated per-uid stats collection by default
Enabled collection of number of calls per-uid. It has relatively small
overhead. Memory impact is minimal and cpu overhead is also small -
250 ns vs 1500 ns with detailed tracking

Detailed tracking is disabled by default. Controlled by
persist.sys.binder_calls_detailed_tracking

Added commands to reset and enable/disable detailed stats:
dumpsys binder_calls_stats --reset
dumpsys binder_calls_stats --enable-detailed-tracking
dumpsys binder_calls_stats --disable-detailed-tracking

Test: manual
Bug: 75318418
Change-Id: I7c1280c025001b6d2b46e4a37bad841712b6da2f
2018-04-20 16:12:41 -07:00
Seigo Nonaka
c5fe967424 Add memory usage tests for various scripts
Here is an example of test result:

android.text.PrecomputedTextMemoryUsageTest:
  MemoryUsage
    Arabic Hyphenation  : 26,087
    Arabic NoHyphenation: 26,087
    CJK Hyphenation     : 58,515
    CJK NoHyphenation   : 58,515
    Latin Hyphenation   : 38,333
    Latin NoHyphenation : 16,077

Bug: 72461923
Test: manually
Change-Id: If3df2243cf9901178b3fd34882fb20f499fef5ab
2018-04-13 14:11:28 -07:00
Nicolas Geoffray
eff3f44260 Exempt two performance tests from hidden API checks.
Bug: 64382372
Bug: 74963051
Bug: 76162083

Test: m
Change-Id: I50f2c8993cfb8fc7b78dc8c87b2cd8d9ee92d98e
2018-04-06 09:20:33 +01:00
jdesprez
3e09705662 Add the CorePerfTests and MultiUserPerfTests to APCT metrics
Add them to the suite version of APCT metric instrumentation.

Test: atest CorePerfTests
Bug: 77280599
Change-Id: Ia8f0c44fcb9fd21869ed64e54483aa87556a469d
2018-03-29 12:17:50 -07:00
Fyodor Kupolov
163a57d71e Merge "Added BinderCallsStatsService" into pi-dev 2018-03-21 23:02:58 +00:00
Seigo Nonaka
c3328d648e Stop creating PrecomputedText in StaticLayout
No performance regressions are expected

android.text.PrecomputedTextPerfTest:
  create NoStyled Hyphenation                  : 17,849,966 -> 17,858,570: (+0.0%)
  create NoStyled Hyphenation WidthOnly        : 17,814,338 -> 17,801,205: (-0.1%)
  create NoStyled NoHyphenation                :  7,123,449 ->  7,068,308: (-0.8%)
  create NoStyled NoHyphenation WidthOnly      :  7,108,169 ->  7,074,908: (-0.5%)
  create Styled Hyphenation                    : 12,179,203 -> 12,131,020: (-0.4%)
  create Styled Hyphenation WidthOnly          : 12,112,347 -> 12,241,311: (+1.1%)
  create Styled NoHyphenation                  : 11,870,126 -> 11,880,442: (+0.1%)
  create Styled NoHyphenation WidthOnly        : 11,836,742 -> 11,860,292: (+0.2%)

android.text.StaticLayoutPerfTest:
  create PrecomputedText Balanced Hyphenation  :    697,713 ->    691,148: (-0.9%)
  create PrecomputedText Balanced NoHyphenation:    517,113 ->    498,106: (-3.7%)
  create PrecomputedText Greedy Hyphenation    :    468,243 ->    455,015: (-2.8%)
  create PrecomputedText Greedy NoHyphenation  :    479,514 ->    461,617: (-3.7%)
  create RandomText Balanced Hyphenation       : 17,183,044 -> 17,049,811: (-0.8%)
  create RandomText Balanced NoHyphenation     :  7,183,745 ->  7,025,070: (-2.2%)
  create RandomText Greedy Hyphenation         :  7,130,841 ->  6,995,785: (-1.9%)
  create RandomText Greedy NoHyphenation       :  7,122,398 ->  7,037,074: (-1.2%)

  draw PrecomputedText NoStyled                :    520,306 ->    551,465: (+6.0%)
  draw PrecomputedText NoStyled WithoutCache   :    545,773 ->    566,956: (+3.9%)
  draw PrecomputedText Styled                  :    826,044 ->    838,979: (+1.6%)
  draw PrecomputedText Styled WithoutCache     :    829,958 ->    841,749: (+1.4%)
  draw RandomText NoStyled                     :    537,079 ->    545,428: (+1.6%)
  draw RandomText NoStyled WithoutCache        :  6,473,166 ->  6,445,194: (-0.4%)
  draw RandomText Styled                       :    995,033 ->  1,015,913: (+2.1%)
  draw RandomText Styled WithoutCache          :  2,725,313 ->  2,770,604: (+1.7%)

android.widget.TextViewPrecomputedTextPerfTest:
  newLayout PrecomputedText                    :    754,311 ->    718,130: (-4.8%)
  newLayout PrecomputedText Selectable         : 17,716,239 -> 17,484,046: (-1.3%)
  newLayout RandomText                         : 16,657,952 -> 16,511,625: (-0.9%)
  newLayout RandomText Selectable              : 17,675,222 -> 17,520,653: (-0.9%)
  onDraw PrecomputedText                       :  1,307,123 ->  1,280,009: (-2.1%)
  onDraw PrecomputedText Selectable            : 17,613,031 -> 17,404,379: (-1.2%)
  onDraw RandomText                            : 17,369,256 -> 17,295,363: (-0.4%)
  onDraw RandomText Selectable                 : 18,207,392 -> 18,077,660: (-0.7%)
  onMeasure PrecomputedText                    :    748,537 ->    739,128: (-1.3%)
  onMeasure PrecomputedText Selectable         : 17,842,953 -> 17,784,459: (-0.3%)
  onMeasure RandomText                         : 16,633,454 -> 16,549,182: (-0.5%)
  onMeasure RandomText Selectable              : 18,022,286 -> 17,873,919: (-0.8%)
  setText PrecomputedText                      :    120,769 ->    119,496: (-1.1%)
  setText PrecomputedText Selectable           :    162,411 ->    150,809: (-7.1%)
  setText RandomText                           :     11,096 ->     10,956: (-1.3%)
  setText RandomText Selectable                :     48,852 ->     48,593: (-0.5%)

Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: I3af758ecc5a15975c4e59c6378faf7c14c3bd65b
2018-03-20 18:57:38 -07:00
Fyodor Kupolov
ca34851ead Added BinderCallsStatsService
It tracks binder calls into the system server and reports
statistics about CPU time spent per call on multiple dimensions,
e.g. uid or call description.

Usage: dumpsys binder_calls_stats
Overhead: ~0.5% per binder call (if enabled)

Test: manual
Bug: 75318418
Change-Id: I13b854f67f8fd1c9f985b8e45f74dcba2e73b9cb
2018-03-16 23:17:03 +00:00
Seigo Nonaka
b0f07d1490 Set span boundary at word boundary in perf test
The style span interval should be the same with word boundary. This
generates weird test case.

Bug: 72998298
Test: N/A
Change-Id: Id1132a455c8b1dd74e21eaeb259703a33ac3b01f
2018-03-15 00:15:58 +00:00
Fyodor Kupolov
86db3b5c10 Merge "Added performance tests for SQLiteCursor iteration" into pi-dev 2018-03-14 17:16:12 +00:00
Fyodor Kupolov
5346f19f9e Added performance tests for SQLiteCursor iteration
Tests forward/backfards iteration when dataset exceeds default
window size.

Test: atest frameworks/base/apct-tests/perftests/core/src/android/database/SQLiteDatabasePerfTest.java
Bug: 37095915
Bug: 64262688
Change-Id: Icc4e4864de0d2c510f7f3da55a6ebf526d5a4506
2018-03-13 18:32:01 -07:00
Seigo Nonaka
12f867ca98 Add selectable text view perf test for random text
The performance characteristics are quite different if selection is
enabled. Good to add selectable random text case for reference.

This CL also fixes makeMeasureSpec miss usage.

android.widget.TextViewPrecomputedTextPerfTest:
    newLayout_PrecomputedText           :    758,899
    newLayout_PrecomputedText_Selectable: 17,923,065
    newLayout_RandomText                : 17,059,504
    newLayout_RandomText_Selectable     : 18,523,234
    onDraw_PrecomputedText              :  4,097,640
    onDraw_PrecomputedText_Selectable   : 17,733,448
    onDraw_RandomText                   : 17,941,208
    onDraw_RandomText_Selectable        : 18,948,912
    onMeasure_PrecomputedText           :    781,546
    onMeasure_PrecomputedText_Selectable: 18,423,652
    onMeasure_RandomText                : 18,067,749
    onMeasure_RandomText_Selectable     : 19,364,439
    setText_PrecomputedText             :     91,383
    setText_PrecomputedText_Selectable  :    161,088
    setText_RandomText                  :     11,142
    setText_RandomText_Selectable       :     54,596

Bug: 72998298
Test: N/A
Change-Id: I8c04fd972897eb804be42adff883df13d87bf11e
2018-03-09 11:12:07 -08:00
Seigo Nonaka
d15f04ef69 Introduce new perf test for TextView with precomputed text
Here is an example of perf test result:

TextView new layout creation time:
  PrecomputedText           :    740,173
  PrecomputedText_Selectable: 17,727,649
  RandomText                : 17,130,685

TextView onDraw time:
  PrecomputedText           :  1,471,075
  PrecomputedText_Selectable: 31,971,393
  RandomText                : 17,667,572

TextView onMeasure time:
  PrecomputedText           :    177,669
  PrecomputedText_Selectable: 17,773,204
  RandomText                :  6,296,358

TextView setText (w/o layout creation) time:
  PrecomputedText           :     91,858
  PrecomputedText_Selectable:    152,665
  RandomText                :     11,130

Bug: 72998298
Test: ran perf test
Change-Id: I69af74ba743499bc444c441c1472fb19878c2eec
2018-03-07 11:34:54 -08:00
Anton Hansson
a3e79fbb8c frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: Ibcffec873a693d1c792ca210fb597d2bf37e9068
Merged-In: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 17:15:21 +00:00
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
TreeHugger Robot
98e10b829d Merge "Add 90th and 95th percentile to ManualBenchmarkState" 2018-02-22 02:14:07 +00:00
Kevin Cheng
1469365c38 Auto-gen AndroidTest.xml for CorePerfTests so atest can run it.
Bug: 68946306
Test: atest CorePerfTests
https://sponge.corp.google.com/target?id=5238c8a7-0016-485f-9eb4-7a91fe86c454&target=CorePerfTests&searchFor=&show=ALL&sortBy=STATUS
Change-Id: I4fe680dddb51151e17546704f554813a588e5f86
2018-02-20 14:51:13 -08:00
Seigo Nonaka
beafa1f9d2 Reorganize MeasuredText API (2nd)
This is 2nd attempt of I7db9e2ca4db68a16648cfb8fcf63555f501304c2

This CL changes the MeasuredText API:
- Rename MeasuredText to PrecomputedText.
- Introduce PrecomputedText.Param which holds all text layout parameters.
- Add API to get PrecomputedText.Param from TextView.
- Remove MeasuredText.Builder and add PrecomputedText.create method instead.
- Remove setRange from MeasuredText since it is not for normal use case.
  (It can not be used for TextView)

Bug: 67504091
Bug: 72861572
Test: bit FrameworksCoreTests:android.text.
Test: atest CtsWidgetTestCases:EditTextTest \
    CtsWidgetTestCases:TextViewFadingEdgeTest \
    FrameworksCoreTests:TextViewFallbackLineSpacingTest \
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest \
    CtsTextTestCases

Change-Id: Ie73bce52c6c673cda58973ddad04627a7cf2e5e9
2018-02-16 19:42:00 -08:00
Seigo Nonaka
4e90fa262d Revert "Reorganize MeasuredText API"
The last change needs more discussion and found some edge cases. Revert and make small step-by-step changes.

Bug: 73091756

This reverts commit 7fd36d19e309ea515b4048cfaabb8035ceab7baf.

Change-Id: I89ff52a70cf6a5d6c553afa20f83719e1f9eb726
2018-02-14 17:03:16 +00:00
Seigo Nonaka
7fd36d19e3 Reorganize MeasuredText API
This CL changes the MeasuredText API:
- Rename MeasuredText to PrecomputedText.
- PrecomputedText is no longer a Spanned.
- Introduce PrecomputedText.Param which holds all text layout parameters.
- Add API to get PrecomputedText.Param from TextView.
- Remove MeasuredText.Builder and add PrecomputedText.create method instead.
- Remove setRange from MeasuredText since it is not for normal use case.
  (It can not be used for TextView)

Here is a performance scores: (median, walleye-userdebug, N=20)

StaticLayout creation time (w/o patch -> w/ patch)
 PrecomputedText Balanced Hyphenation  :    743,615 ->    737,145: (-0.9%)
 PrecomputedText Balanced NoHyphenation:    551,544 ->    542,715: (-1.6%)
 PrecomputedText Greedy Hyphenation    :    500,343 ->    499,601: (-0.1%)
 PrecomputedText Greedy NoHyphenation  :    497,987 ->    492,587: (-1.1%)
 RandomText Balanced Hyphenation       : 19,100,592 -> 19,135,289: (+0.2%)
 RandomText Balanced NoHyphenation     :  8,015,088 ->  7,954,260: (-0.8%)
 RandomText Greedy Hyphenation         :  7,950,915 ->  7,877,424: (-0.9%)
 RandomText Greedy NoHyphenation       :  7,939,337 ->  7,863,471: (-1.0%)

PrecomputedText creation time (w/o patch -> w/ patch)
 NoStyled Hyphenation                  : 18,935,638 -> 18,925,422: (-0.1%)
 NoStyled Hyphenation WidthOnly        : 18,469,726 -> 18,978,413: (+2.8%)
 NoStyled NoHyphenation                :  7,940,792 ->  7,919,127: (-0.3%)
 NoStyled NoHyphenation WidthOnly      :  7,463,230 ->  7,922,643: (+6.2%)
 Styled Hyphenation                    : 14,822,501 -> 14,809,017: (-0.1%)
 Styled Hyphenation WidthOnly          : 13,891,770 -> 14,656,617: (+5.5%)
 Styled NoHyphenation                  : 14,511,134 -> 14,301,503: (-1.4%)
 Styled NoHyphenation WidthOnly        : 13,495,345 -> 14,264,314: (+5.7%)

StaticLayout draw time (w/o patch -> w/ patch)
 PrecomputedText NoStyled              :    663,974 ->    661,610: (-0.4%)
 PrecomputedText NoStyled WithoutCache :    648,294 ->    648,766: (+0.1%)
 PrecomputedText Styled                :    879,322 ->    852,770: (-3.0%)
 PrecomputedText Styled WithoutCache   :  1,084,570 ->  1,110,147: (+2.4%)
 RandomText NoStyled                   :    565,682 ->    555,435: (-1.8%)
 RandomText NoStyled WithoutCache      :  9,070,533 ->  9,064,825: (-0.1%)
 RandomText Styled                     :  2,955,202 ->  2,962,008: (+0.2%)
 RandomText Styled WithoutCache        : 12,242,325 -> 12,228,573: (-0.1%)

Bug: 67504091
Bug: 73091756
Test: bit FrameworksCoreTests:android.text.
Test: atest CtsWidgetTestCases:EditTextTest \
    CtsWidgetTestCases:TextViewFadingEdgeTest \
    FrameworksCoreTests:TextViewFallbackLineSpacingTest \
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest \
    CtsTextTestCases
Change-Id: I7db9e2ca4db68a16648cfb8fcf63555f501304c2
2018-02-12 20:50:41 -08:00
TreeHugger Robot
793a823467 Merge "Introduce perf tests for background text layout performance" 2018-02-08 21:42:52 +00:00
Arthur Eubanks
3ffc6e7e0f Add 90th and 95th percentile to ManualBenchmarkState
Test: m ActivityManagerPerfTestsTestApp ActivityManagerPerfTests
Test: adb install \
$OUT/data/app/ActivityManagerPerfTestsTestApp/ActivityManagerPerfTestsTestApp.apk
Test: adb install \
$OUT/data/app/ActivityManagerPerfTests/ActivityManagerPerfTests.apk
Test: adb shell am instrument -w -e class \
com.android.frameworks.perftests.am.tests.BroadcastPerfTest \
com.android.frameworks.perftests.amtests/android.support.test.runner.AndroidJUnitRunner

BUG: 67460485
Change-Id: I3da7079758b0f8c123d354780f310f357886543c
2018-02-08 09:23:32 -08:00
Seigo Nonaka
97314af576 Introduce perf tests for background text layout performance
Here is an example of perf score:

StaticLayout creation time
 1 Thread:  7,301,172
 2 Thread: 13,842,641
 4 Thread: 25,232,063

Bug: 37567215
Test: See above
Change-Id: I319abd5fe0861575649a1122c91f1949c6ad14d2
2018-02-06 22:23:00 -08:00
Arthur Eubanks
8e44df2722 Add perf tests for PendingIntent
Test: m CorePerfTests
Test: adbi "$OUT"/data/app/CorePerfTests/CorePerfTests.apk
Test: adb shell am instrument -w -e class \
android.app.PendingIntentPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

BUG: 67460485

Change-Id: I45bfc694454b466041d81e37a9010d58c170a4d3
2018-02-06 16:10:17 -08:00
Seigo Nonaka
3fe3869dfe Fix wrong parameter for StaticLayoutPerfTest
Test: N/A
Bug: N/A
Change-Id: I598115d69fc6e59aa28b60644e6cb80794262c11
2018-02-01 16:48:52 -08:00
TreeHugger Robot
ea3ca9d720 Merge "Introduce MeasuredText related perf tests" 2018-01-29 19:30:42 +00:00
Seigo Nonaka
49ca0244c9 Introduce MeasuredText related perf tests
This CL adds two perf test for MeasuredText: the memory usage and
construction time of MeasuredText.

Here is an example output on walleye-userdebug:

Memory Usage (in bytes)
Hyphenation            :    28,448
Hyphenation WidthOnly  :     8,856
NoHyphenation          :    27,592
NoHyphenation WidthOnly:     8,000

MeasuredText creation time
NoStyled Hyphenation            : 18,977,877
NoStyled Hyphenation WidthOnly  : 18,510,041
NoStyled NoHyphenation          :  7,771,936
NoStyled NoHyphenation WidthOnly:  7,332,537
Styled Hyphenation              : 13,514,428
Styled Hyphenation WidthOnly    : 12,446,143
Styled NoHyphenation            : 13,370,358
Styled NoHyphenation WidthOnly  : 13,582,435

Bug: 72461923
Bug: 72462192
Test: See above

Change-Id: I7d326a9e70a29c38c940e0085da2bc4edf2a098a
2018-01-25 10:41:26 -08:00
TreeHugger Robot
f80fa7d91d Merge "Add StaticLayoutPerfTest for drawing" 2018-01-22 19:07:30 +00:00
Seigo Nonaka
52d3b67250 Add StaticLayoutPerfTest for drawing
Bug: 63897135
Test: Here is the sample result on walleye-userdebug

draw MeasuredText NoStyled             :    714,657
draw MeasuredText NoStyled WithoutCache:  9,775,025
draw MeasuredText Styled               :  3,341,118
draw MeasuredText Styled WithoutCache  : 13,214,933
draw RandomText NoStyled               :    649,611
draw RandomText NoStyled WithoutCache  :  9,625,940
draw RandomText Styled                 :  3,296,206
draw RandomText Styled WithoutCache    : 13,735,996

Change-Id: I9c784014ffda997fe60d667734d0e41975198265
2018-01-20 14:23:21 -08:00
TreeHugger Robot
994b690844 Merge "Add performance tests for query / get" 2018-01-19 22:54:28 +00:00
Todd Kennedy
109057e07e Add performance tests for query / get
Bug: 68777480
Test: m CorePerfTests
Test: adb install CorePerfTests.apk
Test: adb shell am instrument -w -e class android.os.PackageManagerPerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Change-Id: I047d9d2e84665fe641a7c354a9f1b16c40f7ff31
2018-01-19 12:32:21 -08:00
Seigo Nonaka
f2829deea4 StaticLayoutPerfTest: Use fixed seed in each test case
Bug: None
Test: run StaticLayoutPerfTest
Change-Id: I49610b8098d67097569091e18d87eafb9911049b
2018-01-18 15:17:09 -08:00
TreeHugger Robot
881a432d08 Merge "Compute hyphenated word pieces in MeasuredText" 2018-01-18 20:32:54 +00:00
Seigo Nonaka
87b1547c92 Compute hyphenated word pieces in MeasuredText
Bug: 67504091
Test: bit CtsTextTestCases:*
Change-Id: Id1ff5abbf6d433a2d8baad364133fca98d1fe450
2018-01-18 18:30:02 +00:00
TreeHugger Robot
ee0ec3093c Merge "Add performance test for Debug.getPss()" 2018-01-18 01:48:27 +00:00
Arthur Eubanks
d131348d09 Add performance test for Debug.getPss()
Test: m CorePerfTests
Test: adb install CorePerfTests.apk
Test: adb shell am instrument -w -e class android.os.PssPerfTest \
com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ia8cacb86c14b9956c9d526195d90848c678da6a6
2018-01-17 14:28:06 -08:00
Seigo Nonaka
b01e18c3ee Merge "Rename PremeasuredText to MeasuredText" 2018-01-16 00:47:52 +00:00