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 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 @benchmark.Enabled('has tabs')
33 @benchmark.Disabled('android', # Benchmark uses > 700MB of memory.
34 'linux') # https://crbug.com/490841
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'