MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / test_counter

Method test_counter

tensorflow/python/eager/monitoring_test.py:29–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27class MonitoringTest(test_util.TensorFlowTestCase):
28
29 def test_counter(self):
30 counter = monitoring.Counter('test/counter', 'test counter')
31 counter.get_cell().increase_by(1)
32 self.assertEqual(counter.get_cell().value(), 1)
33 counter.get_cell().increase_by(5)
34 self.assertEqual(counter.get_cell().value(), 6)
35
36 def test_multiple_counters(self):
37 counter1 = monitoring.Counter('test/counter1', 'test counter', 'label1')

Callers

nothing calls this directly

Calls 4

get_cellMethod · 0.95
increase_byMethod · 0.80
CounterMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected