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 class MemoryIdleMultiTab(perf_benchmark
.PerfBenchmark
):
35 """Use (recorded) real world web sites and measure memory consumption
36 with many tabs and idle times. """
38 page_set
= page_sets
.IdleMultiTabCasesPageSet
40 def SetExtraBrowserOptions(self
, options
):
41 # This benchmark opens tabs from JavaScript, which does not work
42 # with popup-blocking enabled.
43 options
.AppendExtraBrowserArgs(['--disable-popup-blocking'])
47 return 'memory.idle_multi_tab'
50 class MemoryLongRunningIdleGmail(perf_benchmark
.PerfBenchmark
):
51 """Use (recorded) real world web sites and measure memory consumption
52 of long running idle Gmail page """
54 page_set
= page_sets
.LongRunningIdleGmailPageSet
58 return 'memory.long_running_idle_gmail'
61 class MemoryLongRunningIdleGmailBackground(perf_benchmark
.PerfBenchmark
):
62 """Use (recorded) real world web sites and measure memory consumption
63 of long running idle Gmail page in background tab"""
65 page_set
= page_sets
.LongRunningIdleGmailBackgroundPageSet
69 return 'memory.long_running_idle_gmail_background'