| 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 re | 5 import re |
| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | 152 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. |
| 153 @benchmark.Disabled('reference') | 153 @benchmark.Disabled('reference') |
| 154 class V8InfiniteScroll(_InfiniteScrollBenchmark): | 154 class V8InfiniteScroll(_InfiniteScrollBenchmark): |
| 155 """Measures V8 GC metrics and memory usage while scrolling the top web pages. | 155 """Measures V8 GC metrics and memory usage while scrolling the top web pages. |
| 156 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 156 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 157 | 157 |
| 158 page_set = page_sets.InfiniteScrollPageSet | 158 page_set = page_sets.InfiniteScrollPageSet |
| 159 | 159 |
| 160 @classmethod | 160 @classmethod |
| 161 def Name(cls): | 161 def Name(cls): |
| 162 return 'v8.infinite_scroll' | 162 return 'v8.infinite_scroll_tbmv2' |
| 163 | 163 |
| 164 | 164 |
| 165 # Disabled on reference builds because they don't support the new | 165 # Disabled on reference builds because they don't support the new |
| 166 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | 166 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. |
| 167 @benchmark.Disabled('reference') # crbug.com/579546 | 167 @benchmark.Disabled('reference') # crbug.com/579546 |
| 168 class V8InfiniteScrollIgnition(V8InfiniteScroll): | 168 class V8InfiniteScrollIgnition(V8InfiniteScroll): |
| 169 """Measures V8 GC metrics using Ignition.""" | 169 """Measures V8 GC metrics using Ignition.""" |
| 170 | 170 |
| 171 def SetExtraBrowserOptions(self, options): | 171 def SetExtraBrowserOptions(self, options): |
| 172 super(V8InfiniteScrollIgnition, self).SetExtraBrowserOptions(options) | 172 super(V8InfiniteScrollIgnition, self).SetExtraBrowserOptions(options) |
| 173 v8_helper.EnableIgnition(options) | 173 v8_helper.EnableIgnition(options) |
| 174 | 174 |
| 175 @classmethod | 175 @classmethod |
| 176 def Name(cls): | 176 def Name(cls): |
| 177 return 'v8.infinite_scroll-ignition' | 177 return 'v8.infinite_scroll-ignition_tbmv2' |
| 178 | 178 |
| 179 | 179 |
| 180 @benchmark.Enabled('android') | 180 @benchmark.Enabled('android') |
| 181 class V8MobileInfiniteScroll(_InfiniteScrollBenchmark): | 181 class V8MobileInfiniteScroll(_InfiniteScrollBenchmark): |
| 182 """Measures V8 GC metrics and memory usage while scrolling the top mobile | 182 """Measures V8 GC metrics and memory usage while scrolling the top mobile |
| 183 web pages. | 183 web pages. |
| 184 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 184 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 185 | 185 |
| 186 page_set = page_sets.MobileInfiniteScrollPageSet | 186 page_set = page_sets.MobileInfiniteScrollPageSet |
| 187 | 187 |
| 188 @classmethod | 188 @classmethod |
| 189 def Name(cls): | 189 def Name(cls): |
| 190 return 'v8.mobile_infinite_scroll' | 190 return 'v8.mobile_infinite_scroll_tbmv2' |
| 191 | 191 |
| 192 @classmethod | 192 @classmethod |
| 193 def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 | 193 def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 |
| 194 return (possible_browser.browser_type == 'reference' and | 194 return (possible_browser.browser_type == 'reference' and |
| 195 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') | 195 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| 196 | 196 |
| 197 | 197 |
| 198 class _V8MemoryAndCodeSizeBenchmark(perf_benchmark.PerfBenchmark): | 198 class _V8MemoryAndCodeSizeBenchmark(perf_benchmark.PerfBenchmark): |
| 199 """Base class for benchmarks measuring code size.""" | 199 """Base class for benchmarks measuring code size.""" |
| 200 | 200 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 return True | 302 return True |
| 303 # http://crbug.com/623576 | 303 # http://crbug.com/623576 |
| 304 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or | 304 if (possible_browser.platform.GetDeviceTypeName() == 'Nexus 5' or |
| 305 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): | 305 possible_browser.platform.GetDeviceTypeName() == 'Nexus 7'): |
| 306 return True | 306 return True |
| 307 return False | 307 return False |
| 308 | 308 |
| 309 @classmethod | 309 @classmethod |
| 310 def ShouldTearDownStateAfterEachStoryRun(cls): | 310 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 311 return True | 311 return True |
| OLD | NEW |