Пример #1
0
    def execute(self, args):
        self.validate_args(args)
        self.logger.info("Connecting to device...")

        ext_loader = ExtensionLoader(packages=settings.extension_packages,
                                     paths=settings.extension_paths)

        # Setup config
        self.config = RunConfiguration(ext_loader)
        for filepath in settings.get_config_paths():
            self.config.load_config(filepath)
        self.config.set_agenda(Agenda())
        self.config.finalize()

        context = LightContext(self.config)

        # Setup device
        self.device = ext_loader.get_device(settings.device,
                                            **settings.device_config)
        self.device.validate()
        self.device.dynamic_modules = []
        self.device.connect()
        self.device.initialize(context)

        host_binary = context.resolver.get(
            Executable(NO_ONE, self.device.abi, 'revent'))
        self.target_binary = self.device.install_executable(host_binary)

        self.run(args)
Пример #2
0
    def execute(self, args):
        self.validate_args(args)
        self.logger.info("Connecting to device...")

        ext_loader = ExtensionLoader(packages=settings.extension_packages,
                                     paths=settings.extension_paths)

        # Setup config
        self.config = RunConfiguration(ext_loader)
        for filepath in settings.get_config_paths():
            self.config.load_config(filepath)
        self.config.set_agenda(Agenda())
        self.config.finalize()

        context = LightContext(self.config)

        # Setup device
        self.device = ext_loader.get_device(settings.device, **settings.device_config)
        self.device.validate()
        self.device.dynamic_modules = []
        self.device.connect()
        self.device.initialize(context)

        host_binary = context.resolver.get(Executable(NO_ONE, self.device.abi, 'revent'))
        self.target_binary = self.device.install_executable(host_binary)

        self.run(args)
Пример #3
0
    def execute(self, args):  # NOQA
        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)
        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})
Пример #4
0
    def execute(self, args):  # NOQA
        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)
        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})
Пример #5
0
    def execute(self, args):  # NOQA
        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)
        else:
            self.logger.debug('{} is not a file; assuming workload name.'.format(args.agenda))
            agenda = Agenda()
            agenda.add_workload_entry(args.agenda)

        file_name = 'config_{}.py'
        for file_number, path in enumerate(settings.get_config_paths(), 1):
            shutil.copy(path, os.path.join(settings.meta_directory, file_name.format(file_number)))

        executor = Executor()
        executor.execute(agenda, selectors={'ids': args.only_run_ids})