yandextank/plugins/Autostop/plugin.py
def __create_criterion(self, criterion_str):
        """ instantiate criterion from config string """
        parsed = criterion_str.split("(")
        type_str = parsed[0].strip().lower()
        parsed[1] = parsed[1].split(")")[0].strip()

        for criterion_class in self.custom_criterions:
            if criterion_class.get_type_string() == type_str:
                return criterion_class(self, parsed[1])
        raise ValueError(
            "Unsupported autostop criterion type: %s" % criterion_str)
def __create_criterion(self, criterion_str):
        parsed = criterion_str.split("(")
        type_str = parsed[0].strip().lower()
        parsed[1] = parsed[1].split(")")[0].strip()

        for criterion_class in self.custom_criterions:
            if criterion_class.get_type_string() == type_str:
                return criterion_class(self, parsed[1])
        raise ValueError(
            "Unsupported autostop criterion type: %s" % criterion_str)
def __create_criterion ( self , criterion_str ) : parsed = criterion_str . split ( "(" ) type_str = parsed [ 0 ] . strip ( ) . lower ( ) parsed [ 1 ] = parsed [ 1 ] . split ( ")" ) [ 0 ] . strip ( ) for criterion_class in self . custom_criterions : if criterion_class . get_type_string ( ) == type_str : return criterion_class ( self , parsed [ 1 ] ) raise ValueError ( "Unsupported autostop criterion type: %s" % criterion_str )
instantiate criterion from config string
instantiate criterion from config string