OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
5 from telemetry.page import shared_page_state | 5 from telemetry.page import shared_page_state |
6 from telemetry import story | 6 from telemetry import story |
7 | 7 |
8 | 8 |
9 class ToughSchedulingCasesPage(page_module.Page): | 9 class ToughSchedulingCasesPage(page_module.Page): |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 self.synthetic_delays = {'cc.BeginMainFrame': {'target_duration': 0.008}} | 31 self.synthetic_delays = {'cc.BeginMainFrame': {'target_duration': 0.008}} |
32 | 32 |
33 | 33 |
34 class Page2(ToughSchedulingCasesPage): | 34 class Page2(ToughSchedulingCasesPage): |
35 | 35 |
36 """Why: Simulate oversubscribed main thread.""" | 36 """Why: Simulate oversubscribed main thread.""" |
37 | 37 |
38 def __init__(self, page_set): | 38 def __init__(self, page_set): |
39 super(Page2, self).__init__( | 39 super(Page2, self).__init__( |
40 # pylint: disable=C0301 | 40 # pylint: disable=line-too-long |
41 url='file://tough_scheduling_cases/simple_text_page.html?main_very_busy'
, | 41 url='file://tough_scheduling_cases/simple_text_page.html?main_very_busy'
, |
42 page_set=page_set) | 42 page_set=page_set) |
43 | 43 |
44 self.synthetic_delays = {'cc.BeginMainFrame': {'target_duration': 0.024}} | 44 self.synthetic_delays = {'cc.BeginMainFrame': {'target_duration': 0.024}} |
45 | 45 |
46 | 46 |
47 class Page3(ToughSchedulingCasesPage): | 47 class Page3(ToughSchedulingCasesPage): |
48 | 48 |
49 """Why: Simulate a page with a a few graphics layers.""" | 49 """Why: Simulate a page with a a few graphics layers.""" |
50 | 50 |
51 def __init__(self, page_set): | 51 def __init__(self, page_set): |
52 super(Page3, self).__init__( | 52 super(Page3, self).__init__( |
53 # pylint: disable=C0301 | 53 # pylint: disable=line-too-long |
54 url='file://tough_scheduling_cases/simple_text_page.html?medium_layers', | 54 url='file://tough_scheduling_cases/simple_text_page.html?medium_layers', |
55 page_set=page_set) | 55 page_set=page_set) |
56 | 56 |
57 self.synthetic_delays = { | 57 self.synthetic_delays = { |
58 'cc.DrawAndSwap': {'target_duration': 0.004}, | 58 'cc.DrawAndSwap': {'target_duration': 0.004}, |
59 'gpu.PresentingFrame': {'target_duration': 0.004}, | 59 'gpu.PresentingFrame': {'target_duration': 0.004}, |
60 'cc.BeginMainFrame': {'target_duration': 0.004} | 60 'cc.BeginMainFrame': {'target_duration': 0.004} |
61 } | 61 } |
62 | 62 |
63 | 63 |
64 class Page4(ToughSchedulingCasesPage): | 64 class Page4(ToughSchedulingCasesPage): |
65 | 65 |
66 """Why: Simulate a page with many graphics layers.""" | 66 """Why: Simulate a page with many graphics layers.""" |
67 | 67 |
68 def __init__(self, page_set): | 68 def __init__(self, page_set): |
69 super(Page4, self).__init__( | 69 super(Page4, self).__init__( |
70 # pylint: disable=C0301 | 70 # pylint: disable=line-too-long |
71 url='file://tough_scheduling_cases/simple_text_page.html?many_layers', | 71 url='file://tough_scheduling_cases/simple_text_page.html?many_layers', |
72 page_set=page_set) | 72 page_set=page_set) |
73 | 73 |
74 self.synthetic_delays = { | 74 self.synthetic_delays = { |
75 'cc.DrawAndSwap': {'target_duration': 0.012}, | 75 'cc.DrawAndSwap': {'target_duration': 0.012}, |
76 'gpu.PresentingFrame': {'target_duration': 0.012}, | 76 'gpu.PresentingFrame': {'target_duration': 0.012}, |
77 'cc.BeginMainFrame': {'target_duration': 0.012} | 77 'cc.BeginMainFrame': {'target_duration': 0.012} |
78 } | 78 } |
79 | 79 |
80 | 80 |
81 class Page5(ToughSchedulingCasesPage): | 81 class Page5(ToughSchedulingCasesPage): |
82 | 82 |
83 """Why: Simulate a page with expensive recording and rasterization.""" | 83 """Why: Simulate a page with expensive recording and rasterization.""" |
84 | 84 |
85 def __init__(self, page_set): | 85 def __init__(self, page_set): |
86 super(Page5, self).__init__( | 86 super(Page5, self).__init__( |
87 # pylint: disable=C0301 | 87 # pylint: disable=line-too-long |
88 url='file://tough_scheduling_cases/simple_text_page.html?medium_raster', | 88 url='file://tough_scheduling_cases/simple_text_page.html?medium_raster', |
89 page_set=page_set) | 89 page_set=page_set) |
90 | 90 |
91 self.synthetic_delays = { | 91 self.synthetic_delays = { |
92 'cc.RasterRequiredForActivation': {'target_duration': 0.004}, | 92 'cc.RasterRequiredForActivation': {'target_duration': 0.004}, |
93 'cc.BeginMainFrame': {'target_duration': 0.004}, | 93 'cc.BeginMainFrame': {'target_duration': 0.004}, |
94 'gpu.AsyncTexImage': {'target_duration': 0.004} | 94 'gpu.AsyncTexImage': {'target_duration': 0.004} |
95 } | 95 } |
96 | 96 |
97 | 97 |
98 class Page6(ToughSchedulingCasesPage): | 98 class Page6(ToughSchedulingCasesPage): |
99 | 99 |
100 """Why: Simulate a page with expensive recording and rasterization.""" | 100 """Why: Simulate a page with expensive recording and rasterization.""" |
101 | 101 |
102 def __init__(self, page_set): | 102 def __init__(self, page_set): |
103 super(Page6, self).__init__( | 103 super(Page6, self).__init__( |
104 # pylint: disable=C0301 | 104 # pylint: disable=line-too-long |
105 url='file://tough_scheduling_cases/simple_text_page.html?heavy_raster', | 105 url='file://tough_scheduling_cases/simple_text_page.html?heavy_raster', |
106 page_set=page_set) | 106 page_set=page_set) |
107 | 107 |
108 self.synthetic_delays = { | 108 self.synthetic_delays = { |
109 'cc.RasterRequiredForActivation': {'target_duration': 0.024}, | 109 'cc.RasterRequiredForActivation': {'target_duration': 0.024}, |
110 'cc.BeginMainFrame': {'target_duration': 0.024}, | 110 'cc.BeginMainFrame': {'target_duration': 0.024}, |
111 'gpu.AsyncTexImage': {'target_duration': 0.024} | 111 'gpu.AsyncTexImage': {'target_duration': 0.024} |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 class Page7(ToughSchedulingCasesPage): | 115 class Page7(ToughSchedulingCasesPage): |
116 | 116 |
117 """Why: Medium cost touch handler.""" | 117 """Why: Medium cost touch handler.""" |
118 | 118 |
119 def __init__(self, page_set): | 119 def __init__(self, page_set): |
120 super(Page7, self).__init__( | 120 super(Page7, self).__init__( |
121 # pylint: disable=C0301 | 121 # pylint: disable=line-too-long |
122 url='file://tough_scheduling_cases/touch_handler_scrolling.html?medium_h
andler', | 122 url='file://tough_scheduling_cases/touch_handler_scrolling.html?medium_h
andler', |
123 page_set=page_set) | 123 page_set=page_set) |
124 | 124 |
125 self.synthetic_delays = {'blink.HandleInputEvent': | 125 self.synthetic_delays = {'blink.HandleInputEvent': |
126 {'target_duration': 0.008}} | 126 {'target_duration': 0.008}} |
127 | 127 |
128 | 128 |
129 class Page8(ToughSchedulingCasesPage): | 129 class Page8(ToughSchedulingCasesPage): |
130 | 130 |
131 """Why: Slow touch handler.""" | 131 """Why: Slow touch handler.""" |
132 | 132 |
133 def __init__(self, page_set): | 133 def __init__(self, page_set): |
134 super(Page8, self).__init__( | 134 super(Page8, self).__init__( |
135 # pylint: disable=C0301 | 135 # pylint: disable=line-too-long |
136 url='file://tough_scheduling_cases/touch_handler_scrolling.html?slow_han
dler', | 136 url='file://tough_scheduling_cases/touch_handler_scrolling.html?slow_han
dler', |
137 page_set=page_set) | 137 page_set=page_set) |
138 | 138 |
139 self.synthetic_delays = {'blink.HandleInputEvent': | 139 self.synthetic_delays = {'blink.HandleInputEvent': |
140 {'target_duration': 0.024}} | 140 {'target_duration': 0.024}} |
141 | 141 |
142 | 142 |
143 class Page9(ToughSchedulingCasesPage): | 143 class Page9(ToughSchedulingCasesPage): |
144 | 144 |
145 """Why: Touch handler that often takes a long time.""" | 145 """Why: Touch handler that often takes a long time.""" |
146 | 146 |
147 def __init__(self, page_set): | 147 def __init__(self, page_set): |
148 super(Page9, self).__init__( | 148 super(Page9, self).__init__( |
149 # pylint: disable=C0301 | 149 # pylint: disable=line-too-long |
150 url='file://tough_scheduling_cases/touch_handler_scrolling.html?janky_ha
ndler', | 150 url='file://tough_scheduling_cases/touch_handler_scrolling.html?janky_ha
ndler', |
151 page_set=page_set) | 151 page_set=page_set) |
152 | 152 |
153 self.synthetic_delays = {'blink.HandleInputEvent': | 153 self.synthetic_delays = {'blink.HandleInputEvent': |
154 {'target_duration': 0.024, 'mode': 'alternating'} | 154 {'target_duration': 0.024, 'mode': 'alternating'} |
155 } | 155 } |
156 | 156 |
157 | 157 |
158 class Page10(ToughSchedulingCasesPage): | 158 class Page10(ToughSchedulingCasesPage): |
159 | 159 |
160 """Why: Touch handler that occasionally takes a long time.""" | 160 """Why: Touch handler that occasionally takes a long time.""" |
161 | 161 |
162 def __init__(self, page_set): | 162 def __init__(self, page_set): |
163 super(Page10, self).__init__( | 163 super(Page10, self).__init__( |
164 # pylint: disable=C0301 | 164 # pylint: disable=line-too-long |
165 url='file://tough_scheduling_cases/touch_handler_scrolling.html?occasion
ally_janky_handler', | 165 url='file://tough_scheduling_cases/touch_handler_scrolling.html?occasion
ally_janky_handler', |
166 page_set=page_set) | 166 page_set=page_set) |
167 | 167 |
168 self.synthetic_delays = {'blink.HandleInputEvent': | 168 self.synthetic_delays = {'blink.HandleInputEvent': |
169 {'target_duration': 0.024, 'mode': 'oneshot'}} | 169 {'target_duration': 0.024, 'mode': 'oneshot'}} |
170 | 170 |
171 | 171 |
172 class Page11(ToughSchedulingCasesPage): | 172 class Page11(ToughSchedulingCasesPage): |
173 | 173 |
174 """Why: Super expensive touch handler causes browser to scroll after a | 174 """Why: Super expensive touch handler causes browser to scroll after a |
175 timeout.""" | 175 timeout.""" |
176 | 176 |
177 def __init__(self, page_set): | 177 def __init__(self, page_set): |
178 super(Page11, self).__init__( | 178 super(Page11, self).__init__( |
179 # pylint: disable=C0301 | 179 # pylint: disable=line-too-long |
180 url='file://tough_scheduling_cases/touch_handler_scrolling.html?super_sl
ow_handler', | 180 url='file://tough_scheduling_cases/touch_handler_scrolling.html?super_sl
ow_handler', |
181 page_set=page_set) | 181 page_set=page_set) |
182 | 182 |
183 self.synthetic_delays = {'blink.HandleInputEvent': | 183 self.synthetic_delays = {'blink.HandleInputEvent': |
184 {'target_duration': 0.2}} | 184 {'target_duration': 0.2}} |
185 | 185 |
186 | 186 |
187 class Page12(ToughSchedulingCasesPage): | 187 class Page12(ToughSchedulingCasesPage): |
188 | 188 |
189 """Why: Super expensive touch handler that only occupies a part of the page. | 189 """Why: Super expensive touch handler that only occupies a part of the page. |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 desktop=True, | 490 desktop=True, |
491 slow_handler=True, | 491 slow_handler=True, |
492 bounce=True, | 492 bounce=True, |
493 page_set=self)) | 493 page_set=self)) |
494 # Why: For measuring the latency of scroll-synchronized effects. | 494 # Why: For measuring the latency of scroll-synchronized effects. |
495 self.AddStory(SynchronizedScrollOffsetPage(page_set=self)) | 495 self.AddStory(SynchronizedScrollOffsetPage(page_set=self)) |
496 # Why: Test loading a large amount of Javascript. | 496 # Why: Test loading a large amount of Javascript. |
497 self.AddStory(SecondBatchJsPage(page_set=self, variant='light')) | 497 self.AddStory(SecondBatchJsPage(page_set=self, variant='light')) |
498 self.AddStory(SecondBatchJsPage(page_set=self, variant='medium')) | 498 self.AddStory(SecondBatchJsPage(page_set=self, variant='medium')) |
499 self.AddStory(SecondBatchJsPage(page_set=self, variant='heavy')) | 499 self.AddStory(SecondBatchJsPage(page_set=self, variant='heavy')) |
OLD | NEW |