Index: tools/perf/benchmarks/thread_times.py |
diff --git a/tools/perf/benchmarks/thread_times.py b/tools/perf/benchmarks/thread_times.py |
index 9d7400f8d2d4b1d9d59960d900d9303cb9b7cf7c..ea0f6365f7747422c136f90d063b6512bb621a34 100644 |
--- a/tools/perf/benchmarks/thread_times.py |
+++ b/tools/perf/benchmarks/thread_times.py |
@@ -9,6 +9,10 @@ from measurements import thread_times |
import page_sets |
class _ThreadTimes(benchmark.Benchmark): |
+ def __init__(self, measure_per_frame=True): |
+ super(_ThreadTimes, self).__init__() |
+ self._measure_per_frame = measure_per_frame |
+ |
@classmethod |
def AddBenchmarkCommandLineArgs(cls, parser): |
parser.add_option('--report-silk-details', action='store_true', |
@@ -19,7 +23,8 @@ class _ThreadTimes(benchmark.Benchmark): |
return 'thread_times' |
def CreatePageTest(self, options): |
- return thread_times.ThreadTimes(options.report_silk_details) |
+ return thread_times.ThreadTimes(options.report_silk_details, |
+ self._measure_per_frame) |
@benchmark.Enabled('android') |
@@ -89,3 +94,15 @@ class ThreadTimesPolymer(_ThreadTimes): |
def Name(cls): |
return 'thread_times.polymer' |
+@benchmark.Enabled('android') |
+class ThreadTimesKeyPowerCases(_ThreadTimes): |
+ """Measures timeline metrics for sites that should be idle in foreground |
+ and background scenarios. The metrics are aggregated rather than per-frame.""" |
+ page_set = page_sets.KeyPowerCasesPageSet |
+ |
+ def __init__(self): |
+ super(ThreadTimesKeyPowerCases, self).__init__(measure_per_frame=False) |
+ |
+ @classmethod |
+ def Name(cls): |
+ return 'thread_times.key_power_cases' |