1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from core
import perf_benchmark
7 from measurements
import memory
8 from telemetry
import benchmark
12 @benchmark.Enabled('android')
13 class MemoryMobile(perf_benchmark
.PerfBenchmark
):
15 page_set
= page_sets
.MobileMemoryPageSet
19 return 'memory.mobile_memory'
22 class MemoryTop7Stress(perf_benchmark
.PerfBenchmark
):
23 """Use (recorded) real world web sites and measure memory consumption."""
25 page_set
= page_sets
.Top7StressPageSet
29 return 'memory.top_7_stress'
32 class MemoryTop7StressWithSlimmingPaint(perf_benchmark
.PerfBenchmark
):
33 """Use (recorded) real world web sites and measure memory consumption,
34 with --enable--slimming-paint."""
37 page_set
= page_sets
.Top7StressPageSet
39 def SetExtraBrowserOptions(self
, options
):
40 options
.AppendExtraBrowserArgs(['--enable-slimming-paint'])
44 return 'memory.top_7_stress_slimming_paint'
47 @benchmark.Enabled('has tabs')
48 @benchmark.Disabled('android') # Benchmark uses > 700MB of memory.
49 class MemoryIdleMultiTab(perf_benchmark
.PerfBenchmark
):
50 """Use (recorded) real world web sites and measure memory consumption
51 with many tabs and idle times. """
53 page_set
= page_sets
.IdleMultiTabCasesPageSet
55 def SetExtraBrowserOptions(self
, options
):
56 # This benchmark opens tabs from JavaScript, which does not work
57 # with popup-blocking enabled.
58 options
.AppendExtraBrowserArgs(['--disable-popup-blocking'])
62 return 'memory.idle_multi_tab'