

def execute(self, args):
    self.set_up_output_directory(args)
    add_log_file(settings.log_file)
    if os.path.isfile(args.agenda):
        agenda = Agenda(args.agenda)
        settings.agenda = args.agenda
        shutil.copy(args.agenda, settings.meta_directory)
        if (len(agenda.workloads) == 0):
            raise ConfigError('No workloads specified')
    elif (('.' in args.agenda) or (os.sep in args.agenda)):
        raise ConfigError('Agenda "{}" does not exist.'.format(args.agenda))
    else:
        self.logger.debug('{} is not a file; assuming workload name.'.format(args.agenda))
        agenda = Agenda()
        agenda.add_workload_entry(args.agenda)
    if args.instruments_to_disable:
        if ('instrumentation' not in agenda.config):
            agenda.config['instrumentation'] = []
        for itd in args.instruments_to_disable:
            self.logger.debug('Updating agenda to disable {}'.format(itd))
            agenda.config['instrumentation'].append('~{}'.format(itd))
    basename = 'config_'
    for (file_number, path) in enumerate(settings.get_config_paths(), 1):
        file_ext = os.path.splitext(path)[1]
        shutil.copy(path, os.path.join(settings.meta_directory, ((basename + str(file_number)) + file_ext)))
    executor = Executor()
    executor.execute(agenda, selectors={
        'ids': args.only_run_ids,
    })

dataset/ETHPy150Open ARM-software/workload-automation/wlauto/commands/run.py RunCommand.execute/original