| 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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
| 5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
| 6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
| 7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
| 8 | 8 |
| 9 | 9 |
| 10 class ToughSchedulingCasesPage(page_module.PageWithDefaultRunNavigate): | 10 class ToughSchedulingCasesPage(page_module.PageWithDefaultRunNavigate): |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 """ Why: Simulate a page with a a few graphics layers """ | 46 """ Why: Simulate a page with a a few graphics layers """ |
| 47 | 47 |
| 48 def __init__(self, page_set): | 48 def __init__(self, page_set): |
| 49 super(Page3, self).__init__( | 49 super(Page3, self).__init__( |
| 50 # pylint: disable=C0301 | 50 # pylint: disable=C0301 |
| 51 url='file://tough_scheduling_cases/simple_text_page.html?medium_layers', | 51 url='file://tough_scheduling_cases/simple_text_page.html?medium_layers', |
| 52 page_set=page_set) | 52 page_set=page_set) |
| 53 | 53 |
| 54 self.synthetic_delays = { | 54 self.synthetic_delays = { |
| 55 'cc.DrawAndSwap': {'target_duration': 0.004}, | 55 'cc.DrawAndSwap': {'target_duration': 0.004}, |
| 56 'gpu.SwapBuffers': {'target_duration': 0.004}, | 56 'gpu.PresentingFrame': {'target_duration': 0.004}, |
| 57 'cc.BeginMainFrame': {'target_duration': 0.004} | 57 'cc.BeginMainFrame': {'target_duration': 0.004} |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 |
| 61 class Page4(ToughSchedulingCasesPage): | 61 class Page4(ToughSchedulingCasesPage): |
| 62 | 62 |
| 63 """ Why: Simulate a page with many graphics layers """ | 63 """ Why: Simulate a page with many graphics layers """ |
| 64 | 64 |
| 65 def __init__(self, page_set): | 65 def __init__(self, page_set): |
| 66 super(Page4, self).__init__( | 66 super(Page4, self).__init__( |
| 67 # pylint: disable=C0301 | 67 # pylint: disable=C0301 |
| 68 url='file://tough_scheduling_cases/simple_text_page.html?many_layers', | 68 url='file://tough_scheduling_cases/simple_text_page.html?many_layers', |
| 69 page_set=page_set) | 69 page_set=page_set) |
| 70 | 70 |
| 71 self.synthetic_delays = { | 71 self.synthetic_delays = { |
| 72 'cc.DrawAndSwap': {'target_duration': 0.012}, | 72 'cc.DrawAndSwap': {'target_duration': 0.012}, |
| 73 'gpu.SwapBuffers': {'target_duration': 0.012}, | 73 'gpu.PresentingFrame': {'target_duration': 0.012}, |
| 74 'cc.BeginMainFrame': {'target_duration': 0.012} | 74 'cc.BeginMainFrame': {'target_duration': 0.012} |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 class Page5(ToughSchedulingCasesPage): | 78 class Page5(ToughSchedulingCasesPage): |
| 79 | 79 |
| 80 """ Why: Simulate a page with expensive recording and rasterization """ | 80 """ Why: Simulate a page with expensive recording and rasterization """ |
| 81 | 81 |
| 82 def __init__(self, page_set): | 82 def __init__(self, page_set): |
| 83 super(Page5, self).__init__( | 83 super(Page5, self).__init__( |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 class Page15(ToughSchedulingCasesPage): | 230 class Page15(ToughSchedulingCasesPage): |
| 231 | 231 |
| 232 """ Why: Simulate a heavily GPU bound page """ | 232 """ Why: Simulate a heavily GPU bound page """ |
| 233 | 233 |
| 234 def __init__(self, page_set): | 234 def __init__(self, page_set): |
| 235 super(Page15, self).__init__( | 235 super(Page15, self).__init__( |
| 236 url='file://tough_scheduling_cases/raf.html?gpu_bound', | 236 url='file://tough_scheduling_cases/raf.html?gpu_bound', |
| 237 page_set=page_set) | 237 page_set=page_set) |
| 238 | 238 |
| 239 self.synthetic_delays = {'gpu.SwapBuffers': {'target_duration': 0.1}} | 239 self.synthetic_delays = {'gpu.PresentingFrame': {'target_duration': 0.1}} |
| 240 | 240 |
| 241 | 241 |
| 242 class Page16(ToughSchedulingCasesPage): | 242 class Page16(ToughSchedulingCasesPage): |
| 243 | 243 |
| 244 """ Why: Test a requestAnimationFrame handler with a heavy first frame """ | 244 """ Why: Test a requestAnimationFrame handler with a heavy first frame """ |
| 245 | 245 |
| 246 def __init__(self, page_set): | 246 def __init__(self, page_set): |
| 247 super(Page16, self).__init__( | 247 super(Page16, self).__init__( |
| 248 url='file://tough_scheduling_cases/raf.html?heavy_first_frame', | 248 url='file://tough_scheduling_cases/raf.html?heavy_first_frame', |
| 249 page_set=page_set) | 249 page_set=page_set) |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 'file://tough_scheduling_cases/raf_animation.html', | 362 'file://tough_scheduling_cases/raf_animation.html', |
| 363 self)) | 363 self)) |
| 364 # Why: Stress test for the scheduler | 364 # Why: Stress test for the scheduler |
| 365 self.AddPage(ToughSchedulingCasesPage( | 365 self.AddPage(ToughSchedulingCasesPage( |
| 366 'file://tough_scheduling_cases/raf_touch_animation.html', | 366 'file://tough_scheduling_cases/raf_touch_animation.html', |
| 367 self)) | 367 self)) |
| 368 self.AddPage(Page17(self)) | 368 self.AddPage(Page17(self)) |
| 369 self.AddPage(Page18(self)) | 369 self.AddPage(Page18(self)) |
| 370 self.AddPage(Page19(self)) | 370 self.AddPage(Page19(self)) |
| 371 self.AddPage(Page20(self)) | 371 self.AddPage(Page20(self)) |
| OLD | NEW |