def generate_random_events_list(generator_spec_list): """Generates random events for the generators given. Each element in the list of generators includes a generator and number of events to generate for it's entities :param generator_spec_list: list of generators :type generator_spec_list: list :return list of driver events :rtype list """ data = [] for spec in generator_spec_list: generator = spec[tg.GENERATOR] data += tg.generate_data_stream(generator.models, spec[tg.NUM_EVENTS]) random.shuffle(data) return data
def generate_random_events_list(generator_spec_list): """Generates random events for the generators given. Each element in the list of generators includes a generator and number of events to generate for it's entities :param generator_spec_list: list of generators :type generator_spec_list: list :return: list of driver events :rtype list """ data = [] for spec in generator_spec_list: generator = spec[tg.GENERATOR] data += tg.generate_data_stream(generator.models, spec[tg.NUM_EVENTS]) random.shuffle(data) return data