def testTracing(self): if not perf_tracing_agent.PerfProfilerAgent.IsSupported(): return ui.EnableTestMode() categories = ['cycles'] agent = perf_tracing_agent.PerfProfilerAgent(self.device, categories) try: agent.StartAgentTracing(None, None) finally: agent.StopAgentTracing() result = agent.GetResults() json.loads(result.raw_data)
def testTracing(self): if not perf_tracing_agent.PerfProfilerAgent.IsSupported(): return ui.EnableTestMode() categories = 'cycles' agent = perf_tracing_agent.PerfProfilerAgent(self.presentation.device) try: agent.StartAgentTracing(perf_tracing_agent.PerfConfig(categories, self.presentation.device)) finally: agent.StopAgentTracing() result = agent.GetResults() json.loads(result.raw_data)
def testTracing(self): if not perf_controller.PerfProfilerController.IsSupported(): return ui.EnableTestMode() categories = ['cycles'] controller = perf_controller.PerfProfilerController(self.device, categories) interval = 1 try: controller.StartTracing(interval) finally: controller.StopTracing() result = controller.PullTrace() try: with open(result) as f: json.loads(f.read()) finally: os.remove(result)
def setUp(self): ui.EnableTestMode()
def setUp(self): ui.EnableTestMode() self._tracing_options = tracing_controller.TracingControllerConfig( None, None, None, None, None, None, None, None, None)