def _launch_iteration(self):
        started_processes = self._start_processes()

        # Launching botusers...
        if self.verbose:
            print("[Launcher] All processes launched")
        try:
            botusers = []
            for botuser_creator_name, botuser_creator in self.scenario:
                botusers.append(botuser_creator())

            begin_time = time.time()
            for botuser in botusers:
                botuser.start()

            waiting_botusers = botusers[:]
            while len(waiting_botusers) > 0:
                number_before = len(waiting_botusers)
                waiting_botusers = [ botuser for botuser in waiting_botusers if botuser.isAlive() ]
                for _ in range(number_before - len(waiting_botusers)):
                        self._print(".")
                time.sleep(0.3)
            iteration_time = time.time() - begin_time
        finally:
            complete_out, complete_err = self._stop_processes(started_processes)

        botuser_routes = [ botuser.route for botuser in botusers ]
        routes = {}
        for route in botuser_routes:
            if route in routes:
                routes[route] = routes[route] + 1
            else:
                routes[route] = 1

        self._print("  %s" % routes)

        # Compiling iteration data...
        exceptions = {}
        for botuser in botusers:
            for exception, trace in botuser.get_exceptions():
                self._add_exception(exceptions, (exception, trace))
        return Data.BotIteration(iteration_time, exceptions, botusers, complete_out, complete_err)
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/admin/bot/launcher.py/BotLauncher._launch_iteration/original