Chromium Code Reviews| 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 from telemetry import benchmark | |
| 5 from telemetry.core.platform import tracing_category_filter | |
| 6 from telemetry.web_perf import timeline_based_measurement | |
| 7 | |
| 8 import page_sets | |
| 9 | |
| 10 TOPLEVEL_CATEGORY = 'Blob' | |
|
eakuefner
2015/05/22 18:33:18
I think you can group constant definitions togethe
dmurph
2015/05/22 19:06:20
Done.
| |
| 11 | |
| 12 | |
| 13 class BlobStorage(benchmark.Benchmark): | |
| 14 """Timeline based measurement benchmark for Blob Storage.""" | |
|
eakuefner
2015/05/22 18:33:18
nit: newline after
dmurph
2015/05/22 19:06:20
Done.
| |
| 15 page_set = page_sets.BlobWorkshopPageSet | |
| 16 | |
| 17 def CreateTimelineBasedMeasurementOptions(self): | |
| 18 cat_filter = tracing_category_filter.CreateMinimalOverheadFilter() | |
| 19 cat_filter.AddIncludedCategory(TOPLEVEL_CATEGORY) | |
| 20 cat_filter.AddIncludedCategory('blink.console') | |
| 21 | |
| 22 return timeline_based_measurement.Options( | |
| 23 overhead_level=cat_filter) | |
| 24 | |
| 25 @classmethod | |
| 26 def Name(cls): | |
| 27 return 'blob_storage.blob_storage' | |
| 28 | |
| 29 @classmethod | |
| 30 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 31 return (value.name.startswith('Action_CreateBlob') or | |
| 32 value.name.startswith('Action_ReadBlobs') or | |
| 33 'BlobCreateAndRead' in value.name) | |
| OLD | NEW |