1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
13 import yardstick.common.utils as utils
16 @six.add_metaclass(abc.ABCMeta)
19 def __init__(self, conf):
23 def get_cls(dispatcher_type):
24 '''Return class of specified type.'''
25 for dispatcher in utils.itersubclasses(Base):
26 if dispatcher_type == dispatcher.__dispatcher_type__:
28 raise RuntimeError("No such dispatcher_type %s" % dispatcher_type)
32 """Returns instance of a dispatcher for dispatcher type.
34 return Base.get_cls(config["type"])(config)
37 def record_result_data(self, data):
38 """Recording result data interface."""
41 def flush_result_data(self):
42 """Flush result data into permanent storage media interface."""