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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 4
0
 def setUp(self):
     ui.EnableTestMode()
Exemplo n.º 5
0
 def setUp(self):
     ui.EnableTestMode()
     self._tracing_options = tracing_controller.TracingControllerConfig(
         None, None, None, None, None, None, None, None, None)