示例#1
0
文件: generic.py 项目: johnny90/lisa
    def _test_slack(self, experiment, tasks):
        """
        Assert that the RTApp workload was given enough performance

        Use :class:PerfAnalysis to find instances where the experiment's RT-App
        workload wasn't able to complete its activations (i.e. its reported
        "slack" was negative). Assert that this happened less that
        ``negative_slack_allowed_pct`` percent of the time.

        :meth:_test_task_placement asserts that estimated energy usage was
        low. That will pass for runs where too *little* energy was used,
        compromising performance. This method provides a separate test to
        counteract that problem.
        """

        pa = PerfAnalysis(experiment.out_dir)
        for task in tasks:
            slack = pa.df(task)["Slack"]

            bad_activations_pct = len(slack[slack < 0]) * 100. / len(slack)

            msg = 'task {} missed {}% of activations ({}% allowed)'.format(
                task, bad_activations_pct, self.negative_slack_allowed_pct)

            if bad_activations_pct > self.negative_slack_allowed_pct:
                raise AssertionError(msg)
            else:
                self._log.info(msg)
示例#2
0
    def _test_slack(self, experiment, tasks):
        """
        Assert that the RTApp workload was given enough performance

        Use :class:PerfAnalysis to find instances where the experiment's RT-App
        workload wasn't able to complete its activations (i.e. its reported
        "slack" was negative). Assert that this happened less that
        ``negative_slack_allowed_pct`` percent of the time.

        :meth:_test_task_placement asserts that estimated energy usage was
        low. That will pass for runs where too *little* energy was used,
        compromising performance. This method provides a separate test to
        counteract that problem.
        """

        pa = PerfAnalysis(experiment.out_dir)
        for task in tasks:
            slack = pa.df(task)["Slack"]

            bad_activations_pct = len(slack[slack < 0]) * 100. / len(slack)

            msg = 'task {} missed {}% of activations ({}% allowed)'.format(
                    task, bad_activations_pct, self.negative_slack_allowed_pct)

            if bad_activations_pct > self.negative_slack_allowed_pct:
                raise AssertionError(msg)
            else:
                self._log.info(msg)
示例#3
0
def plotdir(run_dir, platform):
    global args
    tasks = None
    pa = None

    # Load RTApp performance data
    try:
        pa = PerfAnalysis(run_dir)

        # Get the list of RTApp tasks
        tasks = pa.tasks()
        logging.info('Tasks: %s', tasks)
    except ValueError:
        pa = None
        logging.info('No performance data found')

    # Load Trace Analysis modules
    trace = Trace(platform, run_dir, tasks)
    ta = TraceAnalysis(trace, tasks)

    # Define time ranges for all the temporal plots
    ta.setXTimeRange(args.tmin, args.tmax)

    # Tasks plots
    if 'tasks' in args.plots:
        ta.plotTasks()
        if pa:
            for task in tasks:
                pa.plotPerf(task)

    # Cluster and CPUs plots
    if 'clusters' in args.plots:
        ta.plotClusterFrequencies()
    if 'cpus' in args.plots:
        ta.plotCPU()

    # SchedTune plots
    if 'stune' in args.plots:
        ta.plotSchedTuneConf()
    if 'ediff' in args.plots:
        ta.plotEDiffTime()
    if 'edspace' in args.plots:
        ta.plotEDiffSpace()
示例#4
0
文件: plots.py 项目: Leo-Yan/lisa
def plotdir(run_dir, platform):
    global args
    tasks = None
    pa = None

    # Load RTApp performance data
    try:
        pa = PerfAnalysis(run_dir)

        # Get the list of RTApp tasks
        tasks = pa.tasks()
        logging.info('Tasks: %s', tasks)
    except ValueError:
        pa = None
        logging.info('No performance data found')

    # Load Trace Analysis modules
    trace = Trace(platform, run_dir, tasks)
    ta = TraceAnalysis(trace, tasks)

    # Define time ranges for all the temporal plots
    ta.setXTimeRange(args.tmin, args.tmax)

    # Tasks plots
    if 'tasks' in args.plots:
        ta.plotTasks()
        if pa:
            for task in tasks:
                pa.plotPerf(task)

    # Cluster and CPUs plots
    if 'clusters' in args.plots:
        ta.plotClusterFrequencies()
    if 'cpus' in args.plots:
        ta.plotCPU()

    # SchedTune plots
    if 'stune' in args.plots:
        ta.plotSchedTuneConf()
    if 'ediff' in args.plots:
        ta.plotEDiffTime();
    if 'edspace' in args.plots:
        ta.plotEDiffSpace();
示例#5
0
 def assert_can_read_logfile(self, exp_tasks):
     """Assert that the perf_analysis module understands the log output"""
     pa = PerfAnalysis(self.host_out_dir)
     self.assertSetEqual(set(exp_tasks), set(pa.tasks()))
示例#6
0
 def assert_can_read_logfile(self, exp_tasks):
     """Assert that the perf_analysis module understands the log output"""
     pa = PerfAnalysis(self.host_out_dir)
     self.assertSetEqual(set(exp_tasks), set(pa.tasks()))