OSDN Git Service

Add more test configuration to StaticLayoutPerfTest
authorSeigo Nonaka <nona@google.com>
Sat, 2 Dec 2017 23:28:41 +0000 (15:28 -0800)
committerSeigo Nonaka <nona@google.com>
Tue, 5 Dec 2017 06:10:40 +0000 (06:10 +0000)
commitf0206bd9eb9de21ea50a123c11f0080c7d74b65d
treee1cb5d45053fe8f8019838ccc7df9aa704dfe3c3
parentf62c26562f150109d9498488ffb9798e4e2a84d8
Add more test configuration to StaticLayoutPerfTest

This CL adds more perf test case for StaticLayout.

The "testCreate" and "testCreateRandom" is renamed to
"testCreate_FixedText_NoStyle_Greedy_NoHyphenation" and
"testCreate_RandomText_NoStyled_Greedy_NoHyphenation".

The test configuration is now constructed with underscores.

- FixedText/RandomText
  The text contents to be used for performing StaticLayout generation.
  FixedText means using the same text.
  RandmText means generating random text.
  This configuration is mainly seeing how LayoutCache performs well.

- NoStyle/Styled
  The text styles to be used for performing StaticLayout generation.
  NoStyle means using not styled text. (CharBuffer is used).
  Styled means using randomly styled text.

- Greedy/Balanced
  The line breaking strategy to be used performing StaticLayout generation.
  Greedy means using Greedy algorithm.
  Balanced means that the line length is balanced.

- Hyphenation/NoHyphenation
  The word can be hyphenated for performing StaticLayout generation.
  Hyphenation means enable hyphenation.
  NoHyphenation means disable hyphenation.

This CL doesn't add all combination since some configuration doesn't
affect others. For example, Styled/NoStyled and
Greedy/Balanced/Hyphenation/NoHyphenation are independent.

Bug: N/A
Test: N/A
Change-Id: Ibd05a6c40b314e2db6a04459a9bfb32334d6e0c7
apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java