Пример #1
0
    def __init__(self, run, topology, execname=None, pid=None):
        """Args:
                run (trappy.Run): A single trappy.Run object
                    or a path that can be passed to trappy.Run
                topology(trappy.stats.Topology): The CPU topology
                execname(str, optional): Optional execname of the task
                     under consideration.
                PID(int): The PID of the task to be checked

            One of pid or execname is mandatory. If only execname
            is specified, The current implementation will fail if
            there are more than one processes with the same execname
        """

        run = Utils.init_run(run)

        if not execname and not pid:
            raise ValueError("Need to specify at least one of pid or execname")

        self.execname = execname
        self._run = run
        self._pid = self._validate_pid(pid)
        self._aggs = {}
        self._topology = topology
        self._triggers = sconf.sched_triggers(self._run, self._pid,
                                              trappy.sched.SchedSwitch)
        self.name = "{}-{}".format(self.execname, self._pid)
Пример #2
0
    def __init__(self, run, topology, execname=None, pid=None):
        """Args:
                run (trappy.Run): A single trappy.Run object
                    or a path that can be passed to trappy.Run
                topology(trappy.stats.Topology): The CPU topology
                execname(str, optional): Optional execname of the task
                     under consideration.
                PID(int): The PID of the task to be checked

            One of pid or execname is mandatory. If only execname
            is specified, The current implementation will fail if
            there are more than one processes with the same execname
        """

        run = Utils.init_run(run)

        if not execname and not pid:
            raise ValueError("Need to specify at least one of pid or execname")

        self.execname = execname
        self._run = run
        self._pid = self._validate_pid(pid)
        self._aggs = {}
        self._topology = topology
        self._triggers = sconf.sched_triggers(self._run, self._pid,
                                              trappy.sched.SchedSwitch)
        self.name = "{}-{}".format(self.execname, self._pid)
Пример #3
0
    def __init__(self, run, topology, execnames):

        self._execnames = listify(execnames)
        self._run = Utils.init_run(run)
        self._pids = self._populate_pids()
        self._topology = topology
        self._asserts = self._populate_asserts()
        self._populate_methods()
Пример #4
0
    def __init__(self, run, topology, execnames):

        self._execnames = listify(execnames)
        self._run = Utils.init_run(run)
        self._pids = self._populate_pids()
        self._topology = topology
        self._asserts = self._populate_asserts()
        self._populate_methods()
Пример #5
0
    def __init__(self,
                 reference_trace,
                 trace,
                 topology,
                 execnames,
                 aggfunc=sconf.csum):

        run = Utils.init_run(trace)
        reference_run = Utils.init_run(reference_trace)

        self._execnames = 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)))
Пример #6
0
    def __init__(
            self,
            reference_trace,
            trace,
            topology,
            execnames,
            aggfunc=sconf.csum):

        run = Utils.init_run(trace)
        reference_run = Utils.init_run(reference_trace)

        self._execnames = 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)))
Пример #7
0
    def __init__(self, run, topology, execnames):
        """Args:
                run (trappy.Run): A single trappy.Run object
                    or a path that can be passed to trappy.Run
                topology(trappy.stats.Topology): The CPU topology
                execname(str, list): List of execnames or single task
        """

        self._execnames = listify(execnames)
        self._run = Utils.init_run(run)
        self._pids = self._populate_pids()
        self._topology = topology
        self._asserts = self._populate_asserts()
        self._populate_methods()
Пример #8
0
    def __init__(self, run, topology, execnames):
        """Args:
                run (trappy.Run): A single trappy.Run object
                    or a path that can be passed to trappy.Run
                topology(trappy.stats.Topology): The CPU topology
                execname(str, list): List of execnames or single task
        """

        self._execnames = listify(execnames)
        self._run = Utils.init_run(run)
        self._pids = self._populate_pids()
        self._topology = topology
        self._asserts = self._populate_asserts()
        self._populate_methods()
Пример #9
0
    def __init__(self, run, topology, execname=None, pid=None):

        run = Utils.init_run(run)

        if not execname and not pid:
            raise ValueError("Need to specify at least one of pid or execname")

        self.execname = execname
        self._run = run
        self._pid = self._validate_pid(pid)
        self._aggs = {}
        self._topology = topology
        self._triggers = sconf.sched_triggers(self._run, self._pid,
                                              trappy.sched.SchedSwitch)
        self.name = "{}-{}".format(self.execname, self._pid)
Пример #10
0
    def __init__(self, run, topology, execname=None, pid=None):

        run = Utils.init_run(run)

        if not execname and not pid:
            raise ValueError("Need to specify at least one of pid or execname")

        self.execname = execname
        self._run = run
        self._pid = self._validate_pid(pid)
        self._aggs = {}
        self._topology = topology
        self._triggers = sconf.sched_triggers(self._run, self._pid,
                                              trappy.sched.SchedSwitch)
        self.name = "{}-{}".format(self.execname, self._pid)
Пример #11
0
    def __init__(self, run, topology, execnames=None, pids=None):

        self._run = Utils.init_run(run)
        self._topology = topology

        if execnames and pids:
            raise ValueError('Either pids or execnames must be specified')
        if execnames:
            self._execnames = 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()
Пример #12
0
    def __init__(self, run, topology, execnames=None, pids=None):

        self._run = Utils.init_run(run)
        self._topology = topology

        if execnames and pids:
            raise ValueError('Either pids or execnames must be specified')
        if execnames:
            self._execnames = 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()
Пример #13
0
    def __init__(self, run, config=None):

        self._run = Utils.init_run(run)
        self._analyzer = Analyzer(self._run, config)
Пример #14
0
    def __init__(self, run, config=None):

        self._run = Utils.init_run(run)
        self._analyzer = Analyzer(self._run, config)