| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import logging | 5 import logging |
| 6 import optparse | 6 import optparse |
| 7 import os | 7 import os |
| 8 import shutil | 8 import shutil |
| 9 import sys | 9 import sys |
| 10 import zipfile | 10 import zipfile |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 def __init__(self, name): | 29 def __init__(self, name): |
| 30 self._name = name | 30 self._name = name |
| 31 | 31 |
| 32 @property | 32 @property |
| 33 def name(self): | 33 def name(self): |
| 34 return self._name | 34 return self._name |
| 35 | 35 |
| 36 class Benchmark(command_line.Command): | 36 class Benchmark(command_line.Command): |
| 37 """Base class for a Telemetry benchmark. | 37 """Base class for a Telemetry benchmark. |
| 38 | 38 |
| 39 A test packages a PageTest/PageMeasurement and a PageSet together. | 39 A test packages a PageTest and a PageSet together. |
| 40 """ | 40 """ |
| 41 options = {} | 41 options = {} |
| 42 | 42 |
| 43 @classmethod | 43 @classmethod |
| 44 def Name(cls): | 44 def Name(cls): |
| 45 name = cls.__module__.split('.')[-1] | 45 name = cls.__module__.split('.')[-1] |
| 46 if hasattr(cls, 'tag'): | 46 if hasattr(cls, 'tag'): |
| 47 name += '.' + cls.tag | 47 name += '.' + cls.tag |
| 48 if hasattr(cls, 'page_set'): | 48 if hasattr(cls, 'page_set'): |
| 49 name += '.' + cls.page_set.Name() | 49 name += '.' + cls.page_set.Name() |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 """ | 204 """ |
| 205 return test_expectations.TestExpectations() | 205 return test_expectations.TestExpectations() |
| 206 | 206 |
| 207 | 207 |
| 208 def AddCommandLineArgs(parser): | 208 def AddCommandLineArgs(parser): |
| 209 page_runner.AddCommandLineArgs(parser) | 209 page_runner.AddCommandLineArgs(parser) |
| 210 | 210 |
| 211 | 211 |
| 212 def ProcessCommandLineArgs(parser, args): | 212 def ProcessCommandLineArgs(parser, args): |
| 213 page_runner.ProcessCommandLineArgs(parser, args) | 213 page_runner.ProcessCommandLineArgs(parser, args) |
| OLD | NEW |