| 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; |
| 11 window.benchmarkFinished = false; | 11 window.benchmarkFinished = false; |
| 12 window.benchmarkBeforeRun = function() { | 12 window.benchmarkBeforeRun = function() { |
| 13 window.benchmarkStarted = true; | 13 window.benchmarkStarted = true; |
| 14 }; | 14 }; |
| 15 window.benchmarkAfterRun = function(score) { | 15 window.benchmarkAfterRun = function(score) { |
| 16 window.benchmarkFinished = true; | 16 window.benchmarkFinished = true; |
| 17 window.benchmarkScore = score; | 17 window.benchmarkScore = score; |
| 18 window.benchmarkAfterRun = null; | 18 window.benchmarkAfterRun = null; |
| 19 };''' | 19 };''' |
| 20 | 20 |
| 21 class OortOnlinePage(page_module.Page): | 21 class OortOnlinePage(page_module.Page): |
| 22 def __init__(self, page_set): | 22 def __init__(self, page_set): |
| 23 super(OortOnlinePage, self).__init__( | 23 super(OortOnlinePage, self).__init__( |
| 24 url='http://oortonline.gl/#run', page_set=page_set, | 24 url='http://oortonline.gl/#run', page_set=page_set, |
| 25 shared_page_state_class=( | 25 shared_page_state_class=( |
| 26 webgl_supported_shared_state.WebGLSupportedSharedState), | 26 webgl_supported_shared_state.WebGLSupportedSharedState), |
| 27 make_javascript_deterministic=False) | 27 make_javascript_deterministic=False, |
| 28 name='http://oortonline.gl/#run') |
| 28 self.archive_data_file = 'data/oortonline.json' | 29 self.archive_data_file = 'data/oortonline.json' |
| 29 self.script_to_evaluate_on_commit = STARTUP_SCRIPT | 30 self.script_to_evaluate_on_commit = STARTUP_SCRIPT |
| 30 | 31 |
| 31 @property | 32 @property |
| 32 def skipped_gpus(self): | 33 def skipped_gpus(self): |
| 33 # crbug.com/462729 | 34 # crbug.com/462729 |
| 34 return ['arm', 'broadcom', 'hisilicon', 'imagination', 'qualcomm', | 35 return ['arm', 'broadcom', 'hisilicon', 'imagination', 'qualcomm', |
| 35 'vivante', 'vmware'] | 36 'vivante', 'vmware'] |
| 36 | 37 |
| 37 class OortOnlinePageSet(story.StorySet): | 38 class OortOnlinePageSet(story.StorySet): |
| 38 """Oort Online WebGL benchmark. | 39 """Oort Online WebGL benchmark. |
| 39 URL: http://oortonline.gl/#run | 40 URL: http://oortonline.gl/#run |
| 40 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html | 41 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
| 41 """ | 42 """ |
| 42 def __init__(self): | 43 def __init__(self): |
| 43 super(OortOnlinePageSet, self).__init__( | 44 super(OortOnlinePageSet, self).__init__( |
| 44 archive_data_file='data/oortonline.json', | 45 archive_data_file='data/oortonline.json', |
| 45 cloud_storage_bucket=story.PARTNER_BUCKET) | 46 cloud_storage_bucket=story.PARTNER_BUCKET, |
| 47 verify_names=True) |
| 46 self.AddStory(OortOnlinePage(self)) | 48 self.AddStory(OortOnlinePage(self)) |
| 47 | 49 |
| 48 class OortOnlineTBMPage(OortOnlinePage): | 50 class OortOnlineTBMPage(OortOnlinePage): |
| 49 def __init__(self, page_set): | 51 def __init__(self, page_set): |
| 50 super(OortOnlineTBMPage, self).__init__(page_set=page_set) | 52 super(OortOnlineTBMPage, self).__init__(page_set=page_set) |
| 51 | 53 |
| 52 def RunPageInteractions(self, action_runner): | 54 def RunPageInteractions(self, action_runner): |
| 53 WAIT_TIME_IN_SECONDS = 2 | 55 WAIT_TIME_IN_SECONDS = 2 |
| 54 RUN_TIME_IN_SECONDS = 20 | 56 RUN_TIME_IN_SECONDS = 20 |
| 55 action_runner.WaitForJavaScriptCondition('window.benchmarkStarted') | 57 action_runner.WaitForJavaScriptCondition('window.benchmarkStarted') |
| (...skipping 13 matching lines...) Expand all Loading... |
| 69 | 71 |
| 70 class OortOnlineTBMPageSet(story.StorySet): | 72 class OortOnlineTBMPageSet(story.StorySet): |
| 71 """Oort Online WebGL benchmark for TBM. | 73 """Oort Online WebGL benchmark for TBM. |
| 72 URL: http://oortonline.gl/#run | 74 URL: http://oortonline.gl/#run |
| 73 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html | 75 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
| 74 """ | 76 """ |
| 75 | 77 |
| 76 def __init__(self): | 78 def __init__(self): |
| 77 super(OortOnlineTBMPageSet, self).__init__( | 79 super(OortOnlineTBMPageSet, self).__init__( |
| 78 archive_data_file='data/oortonline.json', | 80 archive_data_file='data/oortonline.json', |
| 79 cloud_storage_bucket=story.PARTNER_BUCKET) | 81 cloud_storage_bucket=story.PARTNER_BUCKET, |
| 82 verify_names=True) |
| 80 self.AddStory(OortOnlineTBMPage(self)) | 83 self.AddStory(OortOnlineTBMPage(self)) |
| OLD | NEW |