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 | 4 |
5 from page_sets import webgl_supported_shared_state | 5 from page_sets import webgl_supported_shared_state |
6 from telemetry import page as page_module | 6 from telemetry import page as page_module |
7 from telemetry import story | 7 from telemetry import story |
8 | 8 |
9 STARTUP_SCRIPT = ''' | 9 STARTUP_SCRIPT = ''' |
10 window.benchmarkStarted =false; | 10 window.benchmarkStarted =false; |
(...skipping 21 matching lines...) Expand all Loading... |
32 def skipped_gpus(self): | 32 def skipped_gpus(self): |
33 # crbug.com/462729 | 33 # crbug.com/462729 |
34 return ['arm', 'broadcom', 'hisilicon', 'imagination', 'qualcomm', | 34 return ['arm', 'broadcom', 'hisilicon', 'imagination', 'qualcomm', |
35 'vivante', 'vmware'] | 35 'vivante', 'vmware'] |
36 | 36 |
37 class OortOnlinePageSet(story.StorySet): | 37 class OortOnlinePageSet(story.StorySet): |
38 """Oort Online WebGL benchmark. | 38 """Oort Online WebGL benchmark. |
39 URL: http://oortonline.gl/#run | 39 URL: http://oortonline.gl/#run |
40 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html | 40 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
41 """ | 41 """ |
| 42 def __init__(self): |
| 43 super(OortOnlinePageSet, self).__init__( |
| 44 archive_data_file='data/oortonline.json', |
| 45 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 46 self.AddStory(OortOnlinePage(self)) |
| 47 |
| 48 class OortOnlineTBMPage(OortOnlinePage): |
| 49 def __init__(self, page_set): |
| 50 super(OortOnlineTBMPage, self).__init__(page_set=page_set) |
| 51 |
| 52 def RunPageInteractions(self, action_runner): |
| 53 WAIT_TIME_IN_SECONDS = 2 |
| 54 RUN_TIME_IN_SECONDS = 20 |
| 55 action_runner.WaitForJavaScriptCondition('window.benchmarkStarted') |
| 56 # Perform GC to get rid of start-up garbage. |
| 57 action_runner.ForceGarbageCollection() |
| 58 with action_runner.CreateInteraction('Begin'): |
| 59 action_runner.tab.browser.DumpMemory() |
| 60 # Skip the first few seconds to get more stable frame times. |
| 61 action_runner.Wait(WAIT_TIME_IN_SECONDS) |
| 62 with action_runner.CreateInteraction('Running'): |
| 63 # We cannot wait until benchmarkFinished because true because the result |
| 64 # screen does not update, which affects frame-time discrepancy |
| 65 # computation. Instead we stop based on timer. |
| 66 action_runner.Wait(RUN_TIME_IN_SECONDS) |
| 67 with action_runner.CreateInteraction('End'): |
| 68 action_runner.tab.browser.DumpMemory() |
| 69 |
| 70 class OortOnlineTBMPageSet(story.StorySet): |
| 71 """Oort Online WebGL benchmark for TBM. |
| 72 URL: http://oortonline.gl/#run |
| 73 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
| 74 """ |
42 | 75 |
43 def __init__(self): | 76 def __init__(self): |
44 super(OortOnlinePageSet, self).__init__( | 77 super(OortOnlineTBMPageSet, self).__init__( |
45 archive_data_file='data/oortonline.json', | 78 archive_data_file='data/oortonline.json', |
46 cloud_storage_bucket=story.PARTNER_BUCKET) | 79 cloud_storage_bucket=story.PARTNER_BUCKET) |
47 self.AddStory(OortOnlinePage(self)) | 80 self.AddStory(OortOnlineTBMPage(self)) |
OLD | NEW |