| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package com.android.startop.test; |
| 18 |
|
| 19 |
import android.app.Activity; |
| 20 |
import android.view.LayoutInflater; |
| 21 |
|
| 22 |
final class ApplicationBenchmarks { |
| 23 |
|
| 24 |
public static final void initializeBenchmarks(Activity parent, BenchmarkRunner benchmarks) { |
| 25 |
LayoutInflater inflater = LayoutInflater.from(parent); |
| 26 |
|
| 27 |
benchmarks.addBenchmark("Complex Layout", () -> { |
| 28 |
inflater.inflate(R.layout.activity_main, null); |
| 29 |
}); |
| 30 |
|
| 31 |
benchmarks.addBenchmark("TextView List Layout", () -> { |
| 32 |
inflater.inflate(R.layout.textview_list, null); |
| 33 |
}); |
| 34 |
|
| 35 |
benchmarks.addBenchmark("FrameLayout List Layout", () -> { |
| 36 |
inflater.inflate(R.layout.framelayout_list, null); |
| 37 |
}); |
| 38 |
} |
| 39 |
} |