Loading startop/apps/test/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ android_app { "src/InitCheckOverheadBenchmarkActivity.java", "src/InitCheckOverheadBenchmarks.java", "src/LayoutInflationActivity.java", "src/NonInteractiveSystemServerBenchmarkActivity.java", "src/SystemServerBenchmarkActivity.java", "src/NonInteractiveMicrobenchmarkActivity.java", "src/InteractiveMicrobenchmarkActivity.java", "src/SystemServerBenchmarks.java", "src/TextViewInflationActivity.java", ], Loading startop/apps/test/AndroidManifest.xml +4 −4 Original line number Diff line number Diff line Loading @@ -97,8 +97,8 @@ </activity> <activity android:label="SystemServer Benchmark" android:name=".SystemServerBenchmarkActivity" android:label="Interactive Microbenchmarks" android:name=".InteractiveMicrobenchmarkActivity" android:exported="true" > <intent-filter> Loading @@ -109,8 +109,8 @@ </activity> <activity android:label="Non-interactive SystemServer Benchmark" android:name=".NonInteractiveSystemServerBenchmarkActivity" android:label="Non-interactive Microbenchmarks" android:name=".NonInteractiveMicrobenchmarkActivity" android:exported="true" /> </application> Loading startop/apps/test/src/CPUIntensiveBenchmarkActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.startop.test; import android.os.Bundle; public class CPUIntensiveBenchmarkActivity extends SystemServerBenchmarkActivity { public class CPUIntensiveBenchmarkActivity extends InteractiveMicrobenchmarkActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.system_server_benchmark_page); Loading startop/apps/test/src/InitCheckOverheadBenchmarkActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.startop.test; import android.os.Bundle; public class InitCheckOverheadBenchmarkActivity extends SystemServerBenchmarkActivity { public class InitCheckOverheadBenchmarkActivity extends InteractiveMicrobenchmarkActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.system_server_benchmark_page); Loading startop/apps/test/src/SystemServerBenchmarkActivity.java→startop/apps/test/src/InteractiveMicrobenchmarkActivity.java +24 −1 Original line number Diff line number Diff line Loading @@ -18,12 +18,13 @@ package com.android.startop.test; import android.app.Activity; import android.content.Context; import android.graphics.Typeface; import android.os.Bundle; import android.widget.Button; import android.widget.GridLayout; import android.widget.TextView; public class SystemServerBenchmarkActivity extends Activity implements BenchmarkRunner { public class InteractiveMicrobenchmarkActivity extends Activity implements BenchmarkRunner { protected GridLayout mBenchmarkList; protected void onCreate(Bundle savedInstanceState) { Loading @@ -32,9 +33,31 @@ public class SystemServerBenchmarkActivity extends Activity implements Benchmark mBenchmarkList = findViewById(R.id.benchmark_list); addBenchmark("Empty", () -> { }); addHeader("Application Benchmarks"); CPUIntensiveBenchmarks.initializeBenchmarks(this, this); addHeader("Init Check Overhead Benchmarks"); InitCheckOverheadBenchmarks.initializeBenchmarks(this, this); addHeader("System Server Benchmarks"); SystemServerBenchmarks.initializeBenchmarks(this, this); } /** * Add a heading for a group of related benchmarks * * @param name The name of this group of benchmarks */ public void addHeader(CharSequence name) { Context context = mBenchmarkList.getContext(); TextView header = new TextView(context); header.setText(name); header.setTypeface(header.getTypeface(), Typeface.BOLD); GridLayout.LayoutParams params = new GridLayout.LayoutParams(); params.columnSpec = GridLayout.spec(0, 3); mBenchmarkList.addView(header, params); } /** * Adds a benchmark to the set to run. * Loading Loading
startop/apps/test/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ android_app { "src/InitCheckOverheadBenchmarkActivity.java", "src/InitCheckOverheadBenchmarks.java", "src/LayoutInflationActivity.java", "src/NonInteractiveSystemServerBenchmarkActivity.java", "src/SystemServerBenchmarkActivity.java", "src/NonInteractiveMicrobenchmarkActivity.java", "src/InteractiveMicrobenchmarkActivity.java", "src/SystemServerBenchmarks.java", "src/TextViewInflationActivity.java", ], Loading
startop/apps/test/AndroidManifest.xml +4 −4 Original line number Diff line number Diff line Loading @@ -97,8 +97,8 @@ </activity> <activity android:label="SystemServer Benchmark" android:name=".SystemServerBenchmarkActivity" android:label="Interactive Microbenchmarks" android:name=".InteractiveMicrobenchmarkActivity" android:exported="true" > <intent-filter> Loading @@ -109,8 +109,8 @@ </activity> <activity android:label="Non-interactive SystemServer Benchmark" android:name=".NonInteractiveSystemServerBenchmarkActivity" android:label="Non-interactive Microbenchmarks" android:name=".NonInteractiveMicrobenchmarkActivity" android:exported="true" /> </application> Loading
startop/apps/test/src/CPUIntensiveBenchmarkActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.startop.test; import android.os.Bundle; public class CPUIntensiveBenchmarkActivity extends SystemServerBenchmarkActivity { public class CPUIntensiveBenchmarkActivity extends InteractiveMicrobenchmarkActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.system_server_benchmark_page); Loading
startop/apps/test/src/InitCheckOverheadBenchmarkActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.startop.test; import android.os.Bundle; public class InitCheckOverheadBenchmarkActivity extends SystemServerBenchmarkActivity { public class InitCheckOverheadBenchmarkActivity extends InteractiveMicrobenchmarkActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.system_server_benchmark_page); Loading
startop/apps/test/src/SystemServerBenchmarkActivity.java→startop/apps/test/src/InteractiveMicrobenchmarkActivity.java +24 −1 Original line number Diff line number Diff line Loading @@ -18,12 +18,13 @@ package com.android.startop.test; import android.app.Activity; import android.content.Context; import android.graphics.Typeface; import android.os.Bundle; import android.widget.Button; import android.widget.GridLayout; import android.widget.TextView; public class SystemServerBenchmarkActivity extends Activity implements BenchmarkRunner { public class InteractiveMicrobenchmarkActivity extends Activity implements BenchmarkRunner { protected GridLayout mBenchmarkList; protected void onCreate(Bundle savedInstanceState) { Loading @@ -32,9 +33,31 @@ public class SystemServerBenchmarkActivity extends Activity implements Benchmark mBenchmarkList = findViewById(R.id.benchmark_list); addBenchmark("Empty", () -> { }); addHeader("Application Benchmarks"); CPUIntensiveBenchmarks.initializeBenchmarks(this, this); addHeader("Init Check Overhead Benchmarks"); InitCheckOverheadBenchmarks.initializeBenchmarks(this, this); addHeader("System Server Benchmarks"); SystemServerBenchmarks.initializeBenchmarks(this, this); } /** * Add a heading for a group of related benchmarks * * @param name The name of this group of benchmarks */ public void addHeader(CharSequence name) { Context context = mBenchmarkList.getContext(); TextView header = new TextView(context); header.setText(name); header.setTypeface(header.getTypeface(), Typeface.BOLD); GridLayout.LayoutParams params = new GridLayout.LayoutParams(); params.columnSpec = GridLayout.spec(0, 3); mBenchmarkList.addView(header, params); } /** * Adds a benchmark to the set to run. * Loading