| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 201 _IGNORED_V8_STATS_RE = re.compile(r'_(std|count|min|sum|pct_\d{4}(_\d+)?)$') | 201 _IGNORED_V8_STATS_RE = re.compile( |
| 202 r'(?<!dump)(?<!process)_(std|count|min|sum|pct_\d{4}(_\d+)?)$') |
| 202 | 203 |
| 203 def CreateTimelineBasedMeasurementOptions(self): | 204 def CreateTimelineBasedMeasurementOptions(self): |
| 204 category_filter = tracing_category_filter.TracingCategoryFilter( | 205 category_filter = tracing_category_filter.TracingCategoryFilter( |
| 205 '-*, disabled-by-default-memory-infra,' | 206 '-*, disabled-by-default-memory-infra,' |
| 206 # TODO(crbug.com/616441, primiano): Remove this temporary workaround, | 207 # TODO(crbug.com/616441, primiano): Remove this temporary workaround, |
| 207 # which enables memory-infra V8 code stats in V8 code size benchmarks | 208 # which enables memory-infra V8 code stats in V8 code size benchmarks |
| 208 # only (to not slow down detailed memory dumps in other benchmarks). | 209 # only (to not slow down detailed memory dumps in other benchmarks). |
| 209 'disabled-by-default-memory-infra.v8.code_stats') | 210 'disabled-by-default-memory-infra.v8.code_stats') |
| 210 options = timeline_based_measurement.Options(category_filter) | 211 options = timeline_based_measurement.Options(category_filter) |
| 211 # Trigger periodic light memory dumps every 20 ms. | 212 # Trigger periodic light memory dumps every 20 ms. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 def Name(cls): | 296 def Name(cls): |
| 296 return 'v8.google' | 297 return 'v8.google' |
| 297 | 298 |
| 298 @classmethod | 299 @classmethod |
| 299 def ShouldDisable(cls, possible_browser): | 300 def ShouldDisable(cls, possible_browser): |
| 300 return cls.IsSvelte(possible_browser) # http://crbug.com/596556 | 301 return cls.IsSvelte(possible_browser) # http://crbug.com/596556 |
| 301 | 302 |
| 302 @classmethod | 303 @classmethod |
| 303 def ShouldTearDownStateAfterEachStoryRun(cls): | 304 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 304 return True | 305 return True |
| OLD | NEW |