Chromium Code Reviews| Index: tools/perf/benchmarks/blob_storage.py |
| diff --git a/tools/perf/benchmarks/blob_storage.py b/tools/perf/benchmarks/blob_storage.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cd7db73312df0fd8da1c2dd77b4d7cd7f67f029b |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/blob_storage.py |
| @@ -0,0 +1,33 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +from telemetry import benchmark |
| +from telemetry.core.platform import tracing_category_filter |
| +from telemetry.web_perf import timeline_based_measurement |
| + |
| +import page_sets |
| + |
| +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.
|
| + |
| + |
| +class BlobStorage(benchmark.Benchmark): |
| + """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.
|
| + page_set = page_sets.BlobWorkshopPageSet |
| + |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + cat_filter = tracing_category_filter.CreateMinimalOverheadFilter() |
| + cat_filter.AddIncludedCategory(TOPLEVEL_CATEGORY) |
| + cat_filter.AddIncludedCategory('blink.console') |
| + |
| + return timeline_based_measurement.Options( |
| + overhead_level=cat_filter) |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'blob_storage.blob_storage' |
| + |
| + @classmethod |
| + def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| + return (value.name.startswith('Action_CreateBlob') or |
| + value.name.startswith('Action_ReadBlobs') or |
| + 'BlobCreateAndRead' in value.name) |