MCPcopy Create free account
hub / github.com/numpy/numpy / memusage

Function memusage

numpy/testing/_private/utils.py:120–125  ·  view source on GitHub ↗
(processName="python", instance=0)

Source from the content-addressed store, hash-verified

118 win32pdh.CloseQuery(hq)
119
120 def memusage(processName="python", instance=0):
121 # from win32pdhutil, part of the win32all package
122 import win32pdh
123 return GetPerformanceAttributes("Process", "Virtual Bytes",
124 processName, instance,
125 win32pdh.PDH_FMT_LONG, None)
126elif sys.platform[:5] == 'linux':
127
128 def memusage(_proc_pid_stat=f'/proc/{os.getpid()}/stat'):

Callers

nothing calls this directly

Calls 3

GetPerformanceAttributesFunction · 0.85
openFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected