(mcs, clsname, base, attrs)
| 136 | """The Benchmark class registrar. Used by abstract Benchmark class.""" |
| 137 | |
| 138 | def __new__(mcs, clsname, base, attrs): |
| 139 | newclass = super(mcs, _BenchmarkRegistrar).__new__( |
| 140 | mcs, clsname, base, attrs) |
| 141 | if not newclass.is_abstract(): |
| 142 | GLOBAL_BENCHMARK_REGISTRY.add(newclass) |
| 143 | return newclass |
| 144 | |
| 145 | |
| 146 | class Benchmark(six.with_metaclass(_BenchmarkRegistrar, object)): |