| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from telemetry import benchmark |
| 7 from telemetry.timeline import chrome_trace_category_filter | 8 from telemetry.timeline import chrome_trace_category_filter |
| 8 from telemetry.web_perf import timeline_based_measurement | 9 from telemetry.web_perf import timeline_based_measurement |
| 9 | 10 |
| 10 import page_sets | 11 import page_sets |
| 11 | 12 |
| 12 | 13 |
| 13 BLOB_CATEGORY = 'Blob' | 14 BLOB_CATEGORY = 'Blob' |
| 14 TIMELINE_REQUIRED_CATEGORY = 'blink.console' | 15 TIMELINE_REQUIRED_CATEGORY = 'blink.console' |
| 15 | 16 |
| 16 | 17 |
| 18 @benchmark.Disabled('android') # crbug.com/739214 |
| 17 class BlobStorage(perf_benchmark.PerfBenchmark): | 19 class BlobStorage(perf_benchmark.PerfBenchmark): |
| 18 """Timeline based measurement benchmark for Blob Storage.""" | 20 """Timeline based measurement benchmark for Blob Storage.""" |
| 19 | 21 |
| 20 page_set = page_sets.BlobWorkshopPageSet | 22 page_set = page_sets.BlobWorkshopPageSet |
| 21 | 23 |
| 22 def CreateTimelineBasedMeasurementOptions(self): | 24 def CreateTimelineBasedMeasurementOptions(self): |
| 23 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() | 25 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() |
| 24 cat_filter.AddIncludedCategory(BLOB_CATEGORY) | 26 cat_filter.AddIncludedCategory(BLOB_CATEGORY) |
| 25 cat_filter.AddIncludedCategory(TIMELINE_REQUIRED_CATEGORY) | 27 cat_filter.AddIncludedCategory(TIMELINE_REQUIRED_CATEGORY) |
| 26 | 28 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 38 | 40 |
| 39 @classmethod | 41 @classmethod |
| 40 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 42 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 41 if ('blob-writes' not in value.name and | 43 if ('blob-writes' not in value.name and |
| 42 'blob-reads' not in value.name): | 44 'blob-reads' not in value.name): |
| 43 return False | 45 return False |
| 44 return value.values != None | 46 return value.values != None |
| 45 | 47 |
| 46 def GetExpectations(self): | 48 def GetExpectations(self): |
| 47 return page_sets.BlobWorkshopStoryExpectations() | 49 return page_sets.BlobWorkshopStoryExpectations() |
| OLD | NEW |