def get_rtapp_profile(cls, plat_info): start_pct = cls.get_little_duty_cycle(plat_info, 20) end_pct = cls.get_big_duty_cycle(plat_info) rtapp_profile = {} bigs = plat_info["capacity-classes"][-1] for i in range(len(bigs)): rtapp_profile[f"{cls.task_prefix}_{i}"] = Step( start_pct=start_pct, end_pct=end_pct, time_s=2, loops=2, period_ms=cls.TASK_PERIOD_MS) return rtapp_profile
def get_rtapp_profile(cls, plat_info): littles = plat_info["capacity-classes"][0] bigs = plat_info["capacity-classes"][-1] start_pct = cls.unscaled_utilization(plat_info, littles[0], 20) end_pct = cls.unscaled_utilization(plat_info, bigs[0], 70) rtapp_profile = {} for i in range(len(bigs)): rtapp_profile["{}_{}".format(cls.task_prefix, i)] = Step( start_pct=start_pct, end_pct=end_pct, time_s=2, loops=2, period_ms=cls.TASK_PERIOD_MS) return rtapp_profile
def test_profile_step_smoke(self): """ Smoketest Step rt-app workload Creates a workload using Step, tests that the JSON has the expected content, then tests that it can be run. """ profile = {"test_task": Step(start_pct=100, end_pct=0, time_s=1)} exp_phases = [ { 'run': 1000000, 'loop': 1 }, { 'sleep': 1000000, 'loop': 1 }, ] self._do_test(profile, exp_phases)