| 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 import os | 4 import os |
| 5 import shlex | 5 import shlex |
| 6 | 6 |
| 7 from core import path_util | 7 from core import path_util |
| 8 from core import perf_benchmark | 8 from core import perf_benchmark |
| 9 from page_sets import google_pages | 9 from page_sets import google_pages |
| 10 | 10 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 class V8Adword(perf_benchmark.PerfBenchmark): | 236 class V8Adword(perf_benchmark.PerfBenchmark): |
| 237 """Measures V8 Execution metrics on the Adword page.""" | 237 """Measures V8 Execution metrics on the Adword page.""" |
| 238 | 238 |
| 239 def CreateTimelineBasedMeasurementOptions(self): | 239 def CreateTimelineBasedMeasurementOptions(self): |
| 240 | 240 |
| 241 category_filter = tracing_category_filter.CreateMinimalOverheadFilter() | 241 category_filter = tracing_category_filter.CreateMinimalOverheadFilter() |
| 242 category_filter.AddIncludedCategory('v8') | 242 category_filter.AddIncludedCategory('v8') |
| 243 category_filter.AddIncludedCategory('blink.console') | 243 category_filter.AddIncludedCategory('blink.console') |
| 244 options = timeline_based_measurement.Options(category_filter) | 244 options = timeline_based_measurement.Options(category_filter) |
| 245 options.SetLegacyTimelineBasedMetrics([v8_execution.V8ExecutionMetric()]) | 245 options.SetTimelineBasedMetric('executionMetric') |
| 246 return options | 246 return options |
| 247 | 247 |
| 248 def CreateStorySet(self, options): | 248 def CreateStorySet(self, options): |
| 249 """Creates the instance of StorySet used to run the benchmark. | 249 """Creates the instance of StorySet used to run the benchmark. |
| 250 | 250 |
| 251 Can be overridden by subclasses. | 251 Can be overridden by subclasses. |
| 252 """ | 252 """ |
| 253 story_set = story.StorySet( | 253 story_set = story.StorySet( |
| 254 archive_data_file=os.path.join( | 254 archive_data_file=os.path.join( |
| 255 path_util.GetPerfStorySetsDir(), 'data', 'v8_pages.json'), | 255 path_util.GetPerfStorySetsDir(), 'data', 'v8_pages.json'), |
| 256 cloud_storage_bucket=story.PARTNER_BUCKET) | 256 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 257 story_set.AddStory(google_pages.AdwordCampaignDesktopPage(story_set)) | 257 story_set.AddStory(google_pages.AdwordCampaignDesktopPage(story_set)) |
| 258 return story_set | 258 return story_set |
| 259 | 259 |
| 260 @classmethod | 260 @classmethod |
| 261 def Name(cls): | 261 def Name(cls): |
| 262 return 'v8.google' | 262 return 'v8.google' |
| 263 | 263 |
| 264 @classmethod | 264 @classmethod |
| 265 def ShouldDisable(cls, possible_browser): | 265 def ShouldDisable(cls, possible_browser): |
| 266 return cls.IsSvelte(possible_browser) # http://crbug.com/596556 | 266 return cls.IsSvelte(possible_browser) # http://crbug.com/596556 |
| 267 | 267 |
| 268 @classmethod | 268 @classmethod |
| 269 def ShouldTearDownStateAfterEachStoryRun(cls): | 269 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 270 return True | 270 return True |
| OLD | NEW |