Exemple #1
0
 def testNoImpl(self):
     orig_impl = trace_event.trace_event_impl
     try:
         trace_event.trace_event_impl = None
         self.assertFalse(trace_event.trace_can_enable())
     finally:
         trace_event.trace_event_impl = orig_impl
 def testNoImpl(self):
   orig_impl = trace_event.trace_event_impl
   try:
     trace_event.trace_event_impl = None
     self.assertFalse(trace_event.trace_can_enable())
   finally:
     trace_event.trace_event_impl = orig_impl
Exemple #3
0
    def _StartAgentTracingImpl(self):
        """Start tracing for the controller tracing agent.

    Start tracing for the controller tracing agent. Note that
    the tracing controller records the "controller side"
    of the clock sync records, and nothing else.
    """
        if not trace_event.trace_can_enable():
            raise RuntimeError, ('Cannot enable trace_event;'
                                 ' ensure catapult_base is in PYTHONPATH')

        controller_log_file = tempfile.NamedTemporaryFile(delete=False)
        self._log_path = controller_log_file.name
        controller_log_file.close()
        trace_event.trace_enable(self._log_path)
        return True
  def _StartAgentTracingImpl(self):
    """Start tracing for the controller tracing agent.

    Start tracing for the controller tracing agent. Note that
    the tracing controller records the "controller side"
    of the clock sync records, and nothing else.
    """
    if not trace_event.trace_can_enable():
      raise RuntimeError, ('Cannot enable trace_event;'
                           ' ensure catapult_base is in PYTHONPATH')

    controller_log_file = tempfile.NamedTemporaryFile(delete=False)
    self._log_path = controller_log_file.name
    controller_log_file.close()
    trace_event.trace_enable(self._log_path)
    return True
Exemple #5
0
 def testImpl(self):
     self.assertTrue(trace_event.trace_can_enable())
 def testImpl(self):
   self.assertTrue(trace_event.trace_can_enable())