Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b31100da authored by Kohsuke Yatoh's avatar Kohsuke Yatoh
Browse files

Run testSerializeFontMap longer.

This CL partially reverts
commit cc3315a2
because testSerializeFontMap was more stable with the default
warmup duration (5s) and default target duration (16s).

Based on the logs from continuous test execution, it looks like
testSerializeFontMap is executed right after the device is booted,
and background app activities make test results unstable.

Note that testSerializeFontMap results were somewhat unstable even
before we migrated from BenchmarkState to ManualBenchmarkState in
commit 9feb92f9.
ManualBenchmarkState with shorter duration exaggerates the issue because
BenchmarkState repeats one test 5 times but ManualBenchmarkState
does not repeat tests.

Bug: 239758440
Test: atest CorePerfTests:android.graphics.perftests.TypefaceSerializationPerfTest#testSerializeFontMap
Change-Id: Ic8bdcfd5e6fd670e3a23f219267a08a064fc02bf
parent 71dcdd66
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -59,9 +59,8 @@ public class TypefaceSerializationPerfTest {
        Typeface.loadPreinstalledSystemFontMap();
    }

    @ManualBenchmarkState.ManualBenchmarkTest(
            warmupDurationNs = WARMUP_DURATION_NS,
            targetTestDurationNs = TARGET_TEST_DURATION_NS)
    // testSerializeFontMap uses the default targetTestDurationNs, which is much longer than
    // TARGET_TEST_DURATION_NS, in order to stabilize test results.
    @Test
    public void testSerializeFontMap() throws Exception {
        Map<String, Typeface> systemFontMap = Typeface.getSystemFontMap();