def _divide_concurrency(self, concurrency_list):
    '\n        calculate target concurrency for every thread group\n        '
    total_old_concurrency = sum(concurrency_list)
    for (idx, concurrency) in enumerate(concurrency_list):
        if (total_old_concurrency and (concurrency_list[idx] != 0)):
            part_of_load = (((1.0 * self.load.concurrency) * concurrency) / total_old_concurrency)
            concurrency_list[idx] = int(round(part_of_load))
            if (concurrency_list[idx] == 0):
                concurrency_list[idx] = 1
        else:
            concurrency_list[idx] = 0
    total_new_concurrency = sum(concurrency_list)
    leftover = (self.load.concurrency - total_new_concurrency)
    if (leftover < 0):
        msg = 'Had to add %s more threads to maintain thread group proportion'
        self.log.warning(msg, (- leftover))
    elif (leftover > 0):
        msg = '%s threads left undistributed due to thread group proportion'
        self.log.warning(msg, leftover)
calculate target concurrency for every thread group
def _divide_concurrency(self, concurrency_list):
    '\n        \n        '
    total_old_concurrency = sum(concurrency_list)
    for (idx, concurrency) in enumerate(concurrency_list):
        if (total_old_concurrency and (concurrency_list[idx] != 0)):
            part_of_load = (((1.0 * self.load.concurrency) * concurrency) / total_old_concurrency)
            concurrency_list[idx] = int(round(part_of_load))
            if (concurrency_list[idx] == 0):
                concurrency_list[idx] = 1
        else:
            concurrency_list[idx] = 0
    total_new_concurrency = sum(concurrency_list)
    leftover = (self.load.concurrency - total_new_concurrency)
    if (leftover < 0):
        msg = 'Had to add %s more threads to maintain thread group proportion'
        self.log.warning(msg, (- leftover))
    elif (leftover > 0):
        msg = '%s threads left undistributed due to thread group proportion'
        self.log.warning(msg, leftover)