def _detect_thread_group(self, executor):
    '\n        Detect preferred thread group\n        :param executor:\n        :return:\n        '
    tg = self.TG
    if (not self.force_ctg):
        return tg
    msg = 'Thread group detection: %s, regular ThreadGroup will be used'
    if (not self.load.duration):
        self.log.debug(msg, 'duration not found')
    elif self.load.iterations:
        self.log.debug(msg, 'iterations are found')
    elif (not executor.tool):
        msg = 'You must set executor tool (%s) for choosing of ConcurrencyThreadGroup'
        raise TaurusInternalException((msg % executor.tool_name))
    elif (not executor.tool.ctg_plugin_installed()):
        self.log.warning((msg % 'plugin for ConcurrentThreadGroup not found'))
    else:
        tg = self.CTG
    return tg
Detect preferred thread group
:param executor:
:return:
def _detect_thread_group(self, executor):
    '\n        Detect preferred thread group\n        :param executor:\n        :return:\n        '
    tg = self.TG
    if (not self.force_ctg):
        return tg
    msg = 'Thread group detection: %s, regular ThreadGroup will be used'
    if (not self.load.duration):
        self.log.debug(msg, 'duration not found')
    elif self.load.iterations:
        self.log.debug(msg, 'iterations are found')
    elif (not executor.tool):
        msg = 'You must set executor tool (%s) for choosing of ConcurrencyThreadGroup'
        raise TaurusInternalException((msg % executor.tool_name))
    elif (not executor.tool.ctg_plugin_installed()):
        self.log.warning((msg % 'plugin for ConcurrentThreadGroup not found'))
    else:
        tg = self.CTG
    return tg