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

Function collect_resource

Lib/test/pythoninfo.py:727–739  ·  view source on GitHub ↗
(info_add)

Source from the content-addressed store, hash-verified

725
726
727def collect_resource(info_add):
728 try:
729 import resource
730 except ImportError:
731 return
732
733 limits = [attr for attr in dir(resource) if attr.startswith('RLIMIT_')]
734 for name in limits:
735 key = getattr(resource, name)
736 value = resource.getrlimit(key)
737 info_add('resource.%s' % name, value)
738
739 call_func(info_add, 'resource.pagesize', resource, 'getpagesize')
740
741
742def collect_test_socket(info_add):

Callers

nothing calls this directly

Calls 2

call_funcFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…