Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / tools / perf / benchmarks / endure.py
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.
4
5 """The Endure benchmarks measure memory performance over a period of time.
6
7 In each Endure benchmark, one page action is performed repeatedly and memory
8 usage is measured periodically. The specific page actions are defined in the
9 page sets, and the statistics that are gathered are determined by the Endure
10 measurement class.
11 """
12
13 from telemetry import test
14
15 from measurements import endure
16
17
18 class _EndureBenchmark(test.Test):
19   """Base class which sets options for endure benchmarks below."""
20   test = endure.Endure
21   # Default options for endure benchmarks. Could be overridden in subclasses.
22   options = {
23       # Depending on the page and the actions performed on the page,
24       # 2000 iterations should be between 1 and 2 hours.
25       'page_repeat': 2000,
26       # One sample per 10 iterations -> 200 points per run.
27       'perf_stats_interval': 10
28   }
29
30
31 class EndureCalendarForwardBackward(_EndureBenchmark):
32   page_set = 'page_sets/calendar_forward_backward.py'
33
34
35 class EndureBrowserControl(_EndureBenchmark):
36   page_set = 'page_sets/browser_control.py'
37
38
39 class EndureBrowserControlClick(_EndureBenchmark):
40   page_set = 'page_sets/browser_control_click.py'
41
42
43 class EndureGmailAltThreadlistConversation(_EndureBenchmark):
44   page_set = 'page_sets/gmail_alt_threadlist_conversation.py'
45
46
47 class EndureGmailAltTwoLabels(_EndureBenchmark):
48   page_set = 'page_sets/gmail_alt_two_labels.py'
49
50
51 class EndureGmailExpandCollapseConversation(_EndureBenchmark):
52   page_set = 'page_sets/gmail_expand_collapse_conversation.py'
53
54
55 class EndureIndexedDBOffline(_EndureBenchmark):
56   page_set = 'page_sets/indexeddb_offline.py'
57
58
59 class EndurePlusAltPostsPhotos(_EndureBenchmark):
60   page_set = 'page_sets/plus_alt_posts_photos.py'
61
62
63 class EndureGmailRefresh(test.Test):
64   test = endure.Endure
65   # Options for endure gmail page refresh benchmark test.
66   options = {
67       'page_repeat': 20,
68       'perf_stats_interval': 1
69   }
70   page_set = 'page_sets/endure_gmail_refresh.py'