yandextank/plugins/JMeter/reader.py
def _exc_to_net(param1, success):
    """ translate http code to net code. if accertion failed, set net code to 314 """
    if len(param1) <= 3:
        # FIXME: we're unable to use better logic here, because we should support non-http codes
        # but, we should look for core.util.HTTP or some other common logic
        # here
        if success:
            return 0
        else:
            return 314

    exc = param1.split(' ')[-1]
    if exc in KNOWN_EXC.keys():
        return KNOWN_EXC[exc]
    else:
        logger.warning(
            "Unknown Java exception, consider adding it to dictionary: %s",
            param1)
        return 41
def _exc_to_net(param1, success):
    if len(param1) <= 3:
        # FIXME: we're unable to use better logic here, because we should support non-http codes
        # but, we should look for core.util.HTTP or some other common logic
        # here
        if success:
            return 0
        else:
            return 314

    exc = param1.split(' ')[-1]
    if exc in KNOWN_EXC.keys():
        return KNOWN_EXC[exc]
    else:
        logger.warning(
            "Unknown Java exception, consider adding it to dictionary: %s",
            param1)
        return 41
def _exc_to_net ( param1 , success ) : if len ( param1 ) <= 3 : # FIXME: we're unable to use better logic here, because we should support non-http codes # but, we should look for core.util.HTTP or some other common logic # here if success : return 0 else : return 314 exc = param1 . split ( ' ' ) [ - 1 ] if exc in KNOWN_EXC . keys ( ) : return KNOWN_EXC [ exc ] else : logger . warning ( "Unknown Java exception, consider adding it to dictionary: %s" , param1 ) return 41
translate http code to net code. if accertion failed, set net code to 314
translate http code to net code . if accertion failed set net code to 314