mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
framework: move instruments -> instrument
Use the singular to be consistent with other modules in wa.framework.
This commit is contained in:
committed by
setrofim
parent
b7aa7d68b5
commit
12a33c8aeb
@@ -20,7 +20,7 @@ from copy import copy
|
||||
from datetime import datetime
|
||||
|
||||
import wa.framework.signal as signal
|
||||
from wa.framework import instruments
|
||||
from wa.framework import instrument
|
||||
from wa.framework.configuration.core import Status
|
||||
from wa.framework.exception import HostError, WorkloadError
|
||||
from wa.framework.job import Job
|
||||
@@ -302,9 +302,9 @@ class Executor(object):
|
||||
output.write_state()
|
||||
|
||||
self.logger.info('Installing instruments')
|
||||
for instrument in config_manager.get_instruments(self.target_manager.target):
|
||||
instruments.install(instrument, context)
|
||||
instruments.validate()
|
||||
for instrument_name in config_manager.get_instruments(self.target_manager.target):
|
||||
instrument.install(instrument_name, context)
|
||||
instrument.validate()
|
||||
|
||||
self.logger.info('Installing output processors')
|
||||
pm = ProcessorManager()
|
||||
|
@@ -2,7 +2,7 @@ import logging
|
||||
from copy import copy
|
||||
from datetime import datetime
|
||||
|
||||
from wa.framework import pluginloader, signal, instruments
|
||||
from wa.framework import pluginloader, signal, instrument
|
||||
from wa.framework.configuration.core import Status
|
||||
|
||||
# Because of use of Enum (dynamic attrs)
|
||||
@@ -72,7 +72,7 @@ class Job(object):
|
||||
def configure_augmentations(self, context, pm):
|
||||
instruments_to_enable = set()
|
||||
output_processors_to_enable = set()
|
||||
enabled_instruments = set(i.name for i in instruments.get_enabled())
|
||||
enabled_instruments = set(i.name for i in instrument.get_enabled())
|
||||
enabled_output_processors = set(p.name for p in pm.get_enabled())
|
||||
|
||||
for augmentation in self.spec.augmentations.values():
|
||||
@@ -83,11 +83,11 @@ class Job(object):
|
||||
output_processors_to_enable.add(augmentation)
|
||||
|
||||
# Disable unrequired instruments
|
||||
for instrument in enabled_instruments.difference(instruments_to_enable):
|
||||
instruments.disable(instrument)
|
||||
for instrument_name in enabled_instruments.difference(instruments_to_enable):
|
||||
instrument.disable(instrument_name)
|
||||
# Enable additional instruments
|
||||
for instrument in instruments_to_enable.difference(enabled_instruments):
|
||||
instruments.enable(instrument)
|
||||
for instrument_name in instruments_to_enable.difference(enabled_instruments):
|
||||
instrument.enable(instrument_name)
|
||||
|
||||
# Disable unrequired output_processors
|
||||
for processor in enabled_output_processors.difference(output_processors_to_enable):
|
||||
|
@@ -2,7 +2,7 @@ import logging
|
||||
|
||||
from wa.framework import pluginloader
|
||||
from wa.framework.exception import ConfigError
|
||||
from wa.framework.instruments import is_installed
|
||||
from wa.framework.instrument import is_installed
|
||||
from wa.framework.plugin import Plugin
|
||||
from wa.utils.log import log_error, indent, dedent
|
||||
from wa.utils.misc import isiterable
|
||||
|
Reference in New Issue
Block a user