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)
示例#2
0
  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)
示例#3
0
  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)
示例#4
0
 def setUp(self):
     ui.EnableTestMode()
示例#5
0
 def setUp(self):
     ui.EnableTestMode()
     self._tracing_options = tracing_controller.TracingControllerConfig(
         None, None, None, None, None, None, None, None, None)