MCPcopy Index your code
hub / github.com/pythonprofilers/memory_profiler / __init__

Method __init__

memory_profiler.py:229–246  ·  view source on GitHub ↗
(self, monitor_pid, interval, pipe, backend, max_usage=False,
                 *args, **kw)

Source from the content-addressed store, hash-verified

227 """
228
229 def __init__(self, monitor_pid, interval, pipe, backend, max_usage=False,
230 *args, **kw):
231 self.monitor_pid = monitor_pid
232 self.interval = interval
233 self.pipe = pipe
234 self.cont = True
235 self.backend = backend
236 self.max_usage = max_usage
237 self.n_measurements = 1
238
239 self.timestamps = kw.pop("timestamps", False)
240 self.include_children = kw.pop("include_children", False)
241
242 # get baseline memory usage
243 self.mem_usage = [
244 _get_memory(self.monitor_pid, self.backend, timestamps=self.timestamps,
245 include_children=self.include_children)]
246 super(MemTimer, self).__init__(*args, **kw)
247
248 def run(self):
249 self.pipe.send(0) # we're ready

Callers

nothing calls this directly

Calls 2

_get_memoryFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected