MCPcopy Index your code
hub / github.com/python/cpython / RecorderWithDisable

Class RecorderWithDisable

Lib/test/test_monitoring.py:384–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382
383
384class RecorderWithDisable:
385
386 def __init__(self, events):
387 self.disable = False
388 self.events = events
389
390 def __call__(self, code, event):
391 self.events.append(event)
392 if self.disable:
393 return sys.monitoring.DISABLE
394
395
396class MontoringDisableAndRestartTest(MonitoringTestBase, unittest.TestCase):

Callers 4

test_lines_singleMethod · 0.85
test_lines_loopMethod · 0.85
test_lines_twoMethod · 0.85
check_linesMethod · 0.85

Calls

no outgoing calls

Tested by 4

test_lines_singleMethod · 0.68
test_lines_loopMethod · 0.68
test_lines_twoMethod · 0.68
check_linesMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…