Android: Baseline profile generation

This creates a new benchmark module that is responsible for generating baseline profiles and testing them. As part of this commit a baseline-prof.txt file has been included to speed up launch times with the app in its current state. Later, profile generation can be automated and keep up with the app as it changes.
This commit is contained in:
Charles Lombardo
2022-12-09 12:13:34 -05:00
parent 61c10a5644
commit 974003888a
10 changed files with 4085 additions and 1 deletions

View File

@ -33,6 +33,8 @@ android {
versionCode(getBuildVersionCode())
versionName "${getVersion()}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
@ -69,6 +71,19 @@ android {
versionNameSuffix '-debug'
jniDebuggable true
}
benchmark {
signingConfig signingConfigs.debug
matchingFallbacks = ['release']
debuggable false
applicationIdSuffix ".benchmark"
versionNameSuffix '-benchmark'
proguardFiles getDefaultProguardFile(
'proguard-android-optimize.txt'),
'proguard-rules.pro'
minifyEnabled true
shrinkResources true
}
}
externalNativeBuild {
@ -107,6 +122,7 @@ dependencies {
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.core:core-splashscreen:1.0.0'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.profileinstaller:profileinstaller:1.2.1'
// Force dependency version to solve build conflict with androidx preferences
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"

View File

@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-feature
android:name="android.hardware.touchscreen"
@ -44,6 +45,9 @@
<meta-data
android:name="android.max_aspect"
android:value="2.1"/>
<profileable
android:shell="true"
tools:targetApi="29" />
<activity
android:name=".ui.main.MainActivity"

File diff suppressed because it is too large Load Diff