summaryrefslogtreecommitdiff
path: root/tests/SystemUIDemoModeController
diff options
context:
space:
mode:
author Kohsuke Yatoh <kyatoh@google.com> 2022-08-10 01:58:17 +0000
committer Kohsuke Yatoh <kyatoh@google.com> 2022-08-16 00:03:42 +0000
commit23f1be2d5d04f6ad49b2f06885544fd7292a903e (patch)
tree9aefabe47f16556660129f638b50e398ce667dc3 /tests/SystemUIDemoModeController
parent29705980bc915d45bea32209ab424cebc819dd29 (diff)
Preload font before TypefaceSerializationPerfTest.
This CL disables lazy font loading by preloading font in setUp(), in order to stabilize testSerializeFontMap() results. In testSerializeFontMap(), the first serializeFontMap() takes 20x time due to lazy font loading (first call 40ms / avg 2ms on oriole). This makes test results unstable by reducing the number of iterations. ManualBenchmarkState calculates the number of iterations ('mMaxIterations') as follows: mMaxIterations = (int) (mTargetTestDurationNs / (warmupDuration / iterations)); where 'iterations' is the number of iterations done in warmup stage. If the first iteration in warmup stage takes unusually long, 'iterations' becomes small and mMaxIterations will be smaller as well. Bug: 239758440 Test: atest CorePerfTests:android.graphics.perftests.TypefaceSerializationPerfTest#testSerializeFontMap Change-Id: I3181962a1807cb7b4ecbc8e26fe629b9f530e1c1
Diffstat (limited to 'tests/SystemUIDemoModeController')
0 files changed, 0 insertions, 0 deletions