def assertFirstCpu(self, cpus, window=None): """ Check if the Task started (first ran on in the duration of the trace) on a particular CPU(s) :param cpus: A list of acceptable CPUs :type cpus: int, list .. seealso:: :mod:`bart.sched.SchedAssert.SchedAssert.getFirstCPU` """ first_cpu = self.getFirstCpu(window=window) cpus = Utils.listify(cpus) return first_cpu in cpus
def __init__(self, ftrace, topology, execnames=None, pids=None): self._ftrace = Utils.init_ftrace(ftrace) self._topology = topology if execnames and pids: raise ValueError('Either pids or execnames must be specified') if execnames: self._execnames = Utils.listify(execnames) self._pids = self._populate_pids() elif pids: self._pids = pids else: raise ValueError('One of PIDs or execnames must be specified') self._asserts = self._populate_asserts() self._populate_methods()
def __init__(self, reference_trace, trace, topology, execnames, aggfunc=sched_funcs.csum): run = Utils.init_ftrace(trace) reference_run = Utils.init_ftrace(reference_trace) self._execnames = Utils.listify(execnames) self._reference_pids = self._populate_pids(reference_run) self._pids = self._populate_pids(run) self._dimension = len(self._pids) self._topology = topology self._matrix = self._generate_matrix(run, reference_run, aggfunc) if len(self._pids) != len(self._reference_pids): raise RuntimeError( "The runs do not have the same number of PIDs for {0}".format( str(execnames)))
def __init__( self, reference_trace, trace, topology, execnames, aggfunc=sched_funcs.csum): run = Utils.init_ftrace(trace) reference_run = Utils.init_ftrace(reference_trace) self._execnames = Utils.listify(execnames) self._reference_pids = self._populate_pids(reference_run) self._pids = self._populate_pids(run) self._dimension = len(self._pids) self._topology = topology self._matrix = self._generate_matrix(run, reference_run, aggfunc) if len(self._pids) != len(self._reference_pids): raise RuntimeError( "The runs do not have the same number of PIDs for {0}".format( str(execnames)))