Merge "JankBench: Add Bitmap Upload to list of runnable tests"
This commit is contained in:
@@ -70,6 +70,7 @@ public class RunLocalBenchmarksActivity extends AppCompatActivity {
|
||||
R.id.benchmark_text_low_hitrate,
|
||||
R.id.benchmark_edit_text_input,
|
||||
R.id.benchmark_overdraw,
|
||||
R.id.benchmark_bitmap_upload,
|
||||
};
|
||||
|
||||
public static class LocalBenchmarksList extends ListFragment {
|
||||
@@ -204,6 +205,7 @@ public class RunLocalBenchmarksActivity extends AppCompatActivity {
|
||||
case R.id.benchmark_text_low_hitrate:
|
||||
case R.id.benchmark_edit_text_input:
|
||||
case R.id.benchmark_overdraw:
|
||||
case R.id.benchmark_bitmap_upload:
|
||||
case R.id.benchmark_memory_bandwidth:
|
||||
case R.id.benchmark_memory_latency:
|
||||
case R.id.benchmark_power_management:
|
||||
@@ -325,6 +327,9 @@ public class RunLocalBenchmarksActivity extends AppCompatActivity {
|
||||
case R.id.benchmark_overdraw:
|
||||
intent = new Intent(getApplicationContext(), FullScreenOverdrawActivity.class);
|
||||
break;
|
||||
case R.id.benchmark_bitmap_upload:
|
||||
intent = new Intent(getApplicationContext(), BitmapUploadActivity.class);
|
||||
break;
|
||||
case R.id.benchmark_memory_bandwidth:
|
||||
syntheticTestId = 0;
|
||||
intent = new Intent(getApplicationContext(), MemoryActivity.class);
|
||||
|
||||
@@ -229,6 +229,8 @@ public class BenchmarkRegistry {
|
||||
return context.getString(R.string.cpu_gflops_name);
|
||||
case R.id.benchmark_overdraw:
|
||||
return context.getString(R.string.overdraw_name);
|
||||
case R.id.benchmark_bitmap_upload:
|
||||
return context.getString(R.string.bitmap_upload_name);
|
||||
default:
|
||||
return "Some Benchmark";
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.benchmark.R;
|
||||
import com.android.benchmark.registry.BenchmarkRegistry;
|
||||
import com.android.benchmark.ui.automation.Automator;
|
||||
import com.android.benchmark.ui.automation.Interaction;
|
||||
|
||||
@@ -124,7 +125,9 @@ public class BitmapUploadActivity extends AppCompatActivity {
|
||||
final int runId = getIntent().getIntExtra("com.android.benchmark.RUN_ID", 0);
|
||||
final int iteration = getIntent().getIntExtra("com.android.benchmark.ITERATION", -1);
|
||||
|
||||
mAutomator = new Automator("BMUpload", runId, iteration, getWindow(),
|
||||
String name = BenchmarkRegistry.getBenchmarkName(this, R.id.benchmark_bitmap_upload);
|
||||
|
||||
mAutomator = new Automator(name, runId, iteration, getWindow(),
|
||||
new Automator.AutomateCallback() {
|
||||
@Override
|
||||
public void onPostAutomate() {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<item name="benchmark_text_low_hitrate" type="id" />
|
||||
<item name="benchmark_edit_text_input" type="id" />
|
||||
<item name="benchmark_overdraw" type="id" />
|
||||
<item name="benchmark_bitmap_upload" type="id" />
|
||||
<item name="benchmark_memory_bandwidth" type="id" />
|
||||
<item name="benchmark_memory_latency" type="id" />
|
||||
<item name="benchmark_power_management" type="id" />
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
<string name="edit_text_input_description">Tests edit text input</string>
|
||||
<string name="overdraw_name">Overdraw Test</string>
|
||||
<string name="overdraw_description">Tests how the device handles overdraw</string>
|
||||
<string name="bitmap_upload_name">Bitmap Upload Test</string>
|
||||
<string name="bitmap_upload_description">Tests bitmap upload</string>
|
||||
<string name="memory_bandwidth_name">Memory Bandwidth</string>
|
||||
<string name="memory_bandwidth_description">Test device\'s memory bandwidth</string>
|
||||
<string name="memory_latency_name">Memory Latency</string>
|
||||
|
||||
@@ -62,6 +62,12 @@
|
||||
benchmark:category="ui"
|
||||
benchmark:description="@string/overdraw_description" />
|
||||
|
||||
<com.android.benchmark.Benchmark
|
||||
benchmark:name="@string/bitmap_upload_name"
|
||||
benchmark:id="@id/benchmark_bitmap_upload"
|
||||
benchmark:category="ui"
|
||||
benchmark:description="@string/bitmap_upload_description" />
|
||||
|
||||
<!--
|
||||
<com.android.benchmark.Benchmark
|
||||
benchmark:name="@string/memory_bandwidth_name"
|
||||
|
||||
Reference in New Issue
Block a user