OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 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 |
| 5 from core import perf_benchmark |
| 6 |
| 7 import ct_benchmarks_util |
| 8 from measurements import usecounter |
| 9 import page_sets |
| 10 |
| 11 class UseCounterTop10(perf_benchmark.PerfBenchmark): |
| 12 page_set = page_sets.Top10PageSet |
| 13 test = usecounter.UseCounter |
| 14 @classmethod |
| 15 def Name(cls): |
| 16 return 'usecounter.top10' |
| 17 |
| 18 class UseCounterTopDesktop(perf_benchmark.PerfBenchmark): |
| 19 page_set = page_sets.Top2012Q3PageSet |
| 20 test = usecounter.UseCounter |
| 21 @classmethod |
| 22 def Name(cls): |
| 23 return 'usecounter.top_desktop' |
| 24 |
| 25 class UseCounterTop25(perf_benchmark.PerfBenchmark): |
| 26 page_set = page_sets.Top25PageSet |
| 27 test = usecounter.UseCounter |
| 28 @classmethod |
| 29 def Name(cls): |
| 30 return 'usecounter.top25' |
| 31 |
| 32 class UseCounterTop10k(perf_benchmark.PerfBenchmark): |
| 33 page_set = page_sets.Alexa1To10000PageSet |
| 34 test = usecounter.UseCounter |
| 35 @classmethod |
| 36 def Name(cls): |
| 37 return 'usecounter.top10k' |
| 38 |
| 39 class UseCounterCT(perf_benchmark.PerfBenchmark): |
| 40 """Measure use counters in cluster telemetry""" |
| 41 test = usecounter.UseCounter |
| 42 @classmethod |
| 43 def Name(cls): |
| 44 return 'usecounter_ct' |
| 45 |
| 46 @classmethod |
| 47 def AddBenchmarkCommandLineArgs(cls, parser): |
| 48 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) |
| 49 |
| 50 @classmethod |
| 51 def ProcessCommandLineArgs(cls, parser, args): |
| 52 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) |
| 53 |
| 54 def CreateStorySet(self, options): |
| 55 return page_sets.CTPageSet( |
| 56 options.urls_list, options.user_agent, options.archive_data_file) |
OLD | NEW |