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

Commit 4043ca78 authored by Ryan Mitchell's avatar Ryan Mitchell
Browse files

Add Resources Perf Tests

This changes adds benchamrks for Resources, ResourcesManager,
OverlayManager, and Resources.Theme.

Bug: 136085555
Test: atest OverlayManagerPerfTest
Test: atest ResourcesManagerPerfTest
Test: atest ResourcesPerfTest
Test: atest ResourcesThemePerfTest

Change-Id: I6a3b3275399c161e55ff6ce34e7bc2ae5556edf1
parent 68e6b3af
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -9,8 +9,11 @@ LOCAL_SRC_FILES := \
  src/android/os/ISomeService.aidl

LOCAL_STATIC_JAVA_LIBRARIES := \
    androidx.appcompat_appcompat \
    androidx.test.rules \
    androidx.annotation_annotation \
    apct-perftests-overlay-apps \
    apct-perftests-resources-manager-apps \
    apct-perftests-utils \
    guava

@@ -25,5 +28,6 @@ LOCAL_JNI_SHARED_LIBRARIES := libperftestscore_jni
LOCAL_ASSET_DIR := $(TOP)/external/google-fonts/dancing-script

LOCAL_COMPATIBILITY_SUITE += device-tests
LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)
 No newline at end of file
+5 −2
Original line number Diff line number Diff line
@@ -5,8 +5,11 @@
    <permission android:name="com.android.perftests.core.TestPermission" />
    <uses-permission android:name="com.android.perftests.core.TestPermission" />

    <uses-permission
        android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES" />
    <uses-permission android:name="android.permission.DELETE_PACKAGES" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />

    <application>
        <uses-library android:name="android.test.runner" />
+188 −0
Original line number Diff line number Diff line
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

android_test_helper_app {
    name: "Overlay0",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay0",
    ]
}

android_test_helper_app {
    name: "Overlay1",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay1",
    ]
}

android_test_helper_app {
    name: "Overlay2",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay2",
    ]
}

android_test_helper_app {
    name: "Overlay3",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay3",
    ]
}

android_test_helper_app {
    name: "Overlay4",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay4",
    ]
}

android_test_helper_app {
    name: "Overlay5",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay5",
    ]
}

android_test_helper_app {
    name: "Overlay6",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay6",
    ]
}

android_test_helper_app {
    name: "Overlay7",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay7",
    ]
}
android_test_helper_app {
    name: "Overlay8",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay8",
    ]
}

android_test_helper_app {
    name: "Overlay9",
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay9",
    ]
}

android_test_helper_app {
    name: "LargeOverlay0",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large0",
    ]
}

android_test_helper_app {
    name: "LargeOverlay1",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large1",
    ]
}

android_test_helper_app {
    name: "LargeOverlay2",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large2",
    ]
}

android_test_helper_app {
    name: "LargeOverlay3",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large3",
    ]
}

android_test_helper_app {
    name: "LargeOverlay4",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large4",
    ]
}

android_test_helper_app {
    name: "LargeOverlay5",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large5",
    ]
}

android_test_helper_app {
    name: "LargeOverlay6",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large6",
    ]
}

android_test_helper_app {
    name: "LargeOverlay7",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large7",
    ]
}

android_test_helper_app {
    name: "LargeOverlay8",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large8",
    ]
}

android_test_helper_app {
    name: "LargeOverlay9",
    resource_dirs : [ "res_large" ],
    aaptflags: [
        "--rename-manifest-package com.android.perftests.overlay.large9",
    ]
}

java_library {
    name: "apct-perftests-overlay-apps",
    java_resources: [
        ":Overlay0",
        ":Overlay1",
        ":Overlay2",
        ":Overlay3",
        ":Overlay4",
        ":Overlay5",
        ":Overlay6",
        ":Overlay7",
        ":Overlay8",
        ":Overlay9",
        ":LargeOverlay0",
        ":LargeOverlay1",
        ":LargeOverlay2",
        ":LargeOverlay3",
        ":LargeOverlay4",
        ":LargeOverlay5",
        ":LargeOverlay6",
        ":LargeOverlay7",
        ":LargeOverlay8",
        ":LargeOverlay9",
    ],
}
 No newline at end of file
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.perftests.overlay">
    <application android:hasCode="false" />
    <uses-sdk android:targetSdkVersion="29" />
    <overlay android:targetPackage="com.android.perftests.core" android:targetName="TestResources"/>
</manifest>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
  <string name="short_text">B</string>
</resources>
Loading