def test_event_lifetime(self):
     perf_metric = PerfMetric(name)
     perf_metric.event_start(event_name, event_begin)
     perf_metric.event_end(event_name, event_end)
     self.assertEqual(
         1000,
         perf_metric.event_lifetime(event_name, check_active_event=True))
 def test_event_lifetime(self):
     perf_metric = PerfMetric(name)
     perf_metric.event_start(event_name, event_begin)
     perf_metric.event_end(event_name, event_end)
     self.assertEqual(
         1000, perf_metric.event_lifetime(
             event_name, check_active_event=True))
 def test_register_event_time(self):
     perf_metric = PerfMetric(name)
     perf_metric.register_event_time(event_name, t_tag, event_begin)
     self.assertEqual(tagged_event_repr, perf_metric.__repr__())
 def test_event_start(self):
     perf_metric = PerfMetric(name)
     perf_metric.event_start(event_name, event_begin)
     self.assertEqual(event_begin_repr, perf_metric.__repr__())
 def test_deregister_event(self):
     perf_metric = PerfMetric(name)
     perf_metric.register_event_time(event_name, t_tag, event_begin)
     perf_metric.deregister_event(event_name)
     self.assertEqual(expected_repr, perf_metric.__repr__())
 def test___str__(self):
     perf_metric = PerfMetric(name)
     self.assertEqual(expected_repr, perf_metric.__str__())
 def test___init__(self):
     perf_metric = PerfMetric(name)
     self.assertNotEqual(perf_metric, None)
 def test_register_event_time(self):
     perf_metric = PerfMetric(name)
     perf_metric.register_event_time(event_name, t_tag, event_begin)
     self.assertEqual(tagged_event_repr, perf_metric.__repr__())
 def test_event_start(self):
     perf_metric = PerfMetric(name)
     perf_metric.event_start(event_name, event_begin)
     self.assertEqual(event_begin_repr, perf_metric.__repr__())
 def test_deregister_event(self):
     perf_metric = PerfMetric(name)
     perf_metric.register_event_time(event_name, t_tag, event_begin)
     perf_metric.deregister_event(event_name)
     self.assertEqual(expected_repr, perf_metric.__repr__())
 def test___str__(self):
     perf_metric = PerfMetric(name)
     self.assertEqual(expected_repr, perf_metric.__str__())