| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if extra_arg.startswith('--js-flags='): | 74 if extra_arg.startswith('--js-flags='): |
| 75 existing_js_flags.extend(shlex.split(extra_arg[len('--js-flags='):])) | 75 existing_js_flags.extend(shlex.split(extra_arg[len('--js-flags='):])) |
| 76 options.AppendExtraBrowserArgs([ | 76 options.AppendExtraBrowserArgs([ |
| 77 # TODO(perezju): Temporary workaround to disable periodic memory dumps. | 77 # TODO(perezju): Temporary workaround to disable periodic memory dumps. |
| 78 # See: http://crbug.com/513692 | 78 # See: http://crbug.com/513692 |
| 79 '--enable-memory-benchmarking', | 79 '--enable-memory-benchmarking', |
| 80 # Disable push notifications for Facebook. | 80 # Disable push notifications for Facebook. |
| 81 '--disable-notifications', | 81 '--disable-notifications', |
| 82 # This overrides any existing --js-flags, hence we have to include the | 82 # This overrides any existing --js-flags, hence we have to include the |
| 83 # previous flags as well. | 83 # previous flags as well. |
| 84 '--js-flags="--heap-growing-percent=10 %s"' % | 84 '--js-flags=--heap-growing-percent=10 %s' % |
| 85 (' '.join(existing_js_flags)) | 85 (' '.join(existing_js_flags)) |
| 86 ]) | 86 ]) |
| 87 | 87 |
| 88 def CreateTimelineBasedMeasurementOptions(self): | 88 def CreateTimelineBasedMeasurementOptions(self): |
| 89 v8_categories = [ | 89 v8_categories = [ |
| 90 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] | 90 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] |
| 91 smoothness_categories = [ | 91 smoothness_categories = [ |
| 92 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] | 92 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] |
| 93 categories = list(set(v8_categories + smoothness_categories)) | 93 categories = list(set(v8_categories + smoothness_categories)) |
| 94 memory_categories = 'blink.console,disabled-by-default-memory-infra' | 94 memory_categories = 'blink.console,disabled-by-default-memory-infra' |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 page_set = page_sets.TodoMVCPageSet | 147 page_set = page_sets.TodoMVCPageSet |
| 148 | 148 |
| 149 def SetExtraBrowserOptions(self, options): | 149 def SetExtraBrowserOptions(self, options): |
| 150 existing_js_flags = [] | 150 existing_js_flags = [] |
| 151 for extra_arg in options.extra_browser_args: | 151 for extra_arg in options.extra_browser_args: |
| 152 if extra_arg.startswith('--js-flags='): | 152 if extra_arg.startswith('--js-flags='): |
| 153 existing_js_flags.extend(shlex.split(extra_arg[len('--js-flags='):])) | 153 existing_js_flags.extend(shlex.split(extra_arg[len('--js-flags='):])) |
| 154 options.AppendExtraBrowserArgs([ | 154 options.AppendExtraBrowserArgs([ |
| 155 # This overrides any existing --js-flags, hence we have to include the | 155 # This overrides any existing --js-flags, hence we have to include the |
| 156 # previous flags as well. | 156 # previous flags as well. |
| 157 '--js-flags="--ignition %s"' % (' '.join(existing_js_flags)) | 157 '--js-flags=--ignition %s' % (' '.join(existing_js_flags)) |
| 158 ]) | 158 ]) |
| 159 | 159 |
| 160 def CreateTimelineBasedMeasurementOptions(self): | 160 def CreateTimelineBasedMeasurementOptions(self): |
| 161 category_filter = tracing_category_filter.CreateMinimalOverheadFilter() | 161 category_filter = tracing_category_filter.CreateMinimalOverheadFilter() |
| 162 category_filter.AddIncludedCategory('v8') | 162 category_filter.AddIncludedCategory('v8') |
| 163 category_filter.AddIncludedCategory('blink.console') | 163 category_filter.AddIncludedCategory('blink.console') |
| 164 options = timeline_based_measurement.Options(category_filter) | 164 options = timeline_based_measurement.Options(category_filter) |
| 165 options.SetLegacyTimelineBasedMetrics([v8_execution.V8ExecutionMetric()]) | 165 options.SetLegacyTimelineBasedMetrics([v8_execution.V8ExecutionMetric()]) |
| 166 return options | 166 return options |
| 167 | 167 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 story_set.AddStory(google_pages.AdwordCampaignDesktopPage(story_set)) | 226 story_set.AddStory(google_pages.AdwordCampaignDesktopPage(story_set)) |
| 227 return story_set | 227 return story_set |
| 228 | 228 |
| 229 @classmethod | 229 @classmethod |
| 230 def Name(cls): | 230 def Name(cls): |
| 231 return 'v8.google' | 231 return 'v8.google' |
| 232 | 232 |
| 233 @classmethod | 233 @classmethod |
| 234 def ShouldTearDownStateAfterEachStoryRun(cls): | 234 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 235 return True | 235 return True |
| OLD | NEW |