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

Method f

memory_profiler.py:598–615  ·  view source on GitHub ↗
(*args, **kwds)

Source from the content-addressed store, hash-verified

596 """
597
598 def f(*args, **kwds):
599 # Start time
600 try:
601 filename = inspect.getsourcefile(func)
602 except TypeError:
603 filename = '<unknown>'
604 timestamps = [
605 _get_memory(os.getpid(), self.backend, timestamps=True,
606 include_children=self.include_children, filename=filename)]
607 self.functions[func].append(timestamps)
608 try:
609 with self.call_on_stack(func, *args, **kwds) as result:
610 return result
611 finally:
612 # end time
613 timestamps.append(_get_memory(os.getpid(), self.backend, timestamps=True,
614 include_children=self.include_children,
615 filename=filename))
616
617 return f
618

Callers

nothing calls this directly

Calls 2

call_on_stackMethod · 0.95
_get_memoryFunction · 0.85

Tested by

no test coverage detected