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
9 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 @benchmark.Disabled('yosemite') # crbug.com/517806
23 class MemoryTop7Stress(perf_benchmark
.PerfBenchmark
):
24 """Use (recorded) real world web sites and measure memory consumption."""
26 page_set
= page_sets
.Top7StressPageSet
30 return 'memory.top_7_stress'
33 @benchmark.Enabled('has tabs')
34 @benchmark.Disabled('android') # Benchmark uses > 700MB of memory.
35 class MemoryIdleMultiTab(perf_benchmark
.PerfBenchmark
):
36 """Use (recorded) real world web sites and measure memory consumption
37 with many tabs and idle times. """
39 page_set
= page_sets
.IdleMultiTabCasesPageSet
41 def SetExtraBrowserOptions(self
, options
):
42 # This benchmark opens tabs from JavaScript, which does not work
43 # with popup-blocking enabled.
44 options
.AppendExtraBrowserArgs(['--disable-popup-blocking'])
48 return 'memory.idle_multi_tab'
51 class MemoryLongRunningIdleGmail(perf_benchmark
.PerfBenchmark
):
52 """Use (recorded) real world web sites and measure memory consumption
53 of long running idle Gmail page """
55 page_set
= page_sets
.LongRunningIdleGmailPageSet
59 return 'memory.long_running_idle_gmail'
62 class MemoryLongRunningIdleGmailBackground(perf_benchmark
.PerfBenchmark
):
63 """Use (recorded) real world web sites and measure memory consumption
64 of long running idle Gmail page in background tab"""
66 page_set
= page_sets
.LongRunningIdleGmailBackgroundPageSet
70 return 'memory.long_running_idle_gmail_background'