OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. |
| 7 |
| 8 from core import perf_benchmark |
| 9 |
| 10 from telemetry.core.platform import tracing_category_filter |
| 11 from telemetry.web_perf import timeline_based_measurement |
| 12 |
| 13 import page_sets |
| 14 |
| 15 |
| 16 BLOB_CATEGORY = 'Blob' |
| 17 TIMELINE_REQUIRED_CATEGORY = 'blink.console' |
| 18 |
| 19 |
| 20 class BlobStorage(perf_benchmark.PerfBenchmark): |
| 21 """Timeline based measurement benchmark for Blob Storage.""" |
| 22 |
| 23 page_set = page_sets.BlobWorkshopPageSet |
| 24 |
| 25 def CreateTimelineBasedMeasurementOptions(self): |
| 26 cat_filter = tracing_category_filter.CreateMinimalOverheadFilter() |
| 27 cat_filter.AddIncludedCategory(BLOB_CATEGORY) |
| 28 cat_filter.AddIncludedCategory(TIMELINE_REQUIRED_CATEGORY) |
| 29 |
| 30 return timeline_based_measurement.Options( |
| 31 overhead_level=cat_filter) |
| 32 |
| 33 @classmethod |
| 34 def Name(cls): |
| 35 return 'blob_storage.blob_storage' |
| 36 |
| 37 @classmethod |
| 38 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 39 if ('blob-writes' not in value.name and |
| 40 'blob-reads' not in value.name): |
| 41 return False |
| 42 return value.values != None |
OLD | NEW |