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

Method get_traced_memory

Lib/test/test_tracemalloc.py:1036–1041  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1034 _testcapi.tracemalloc_untrack(self.domain, self.ptr, release_gil)
1035
1036 def get_traced_memory(self):
1037 # Get the traced size in the domain
1038 snapshot = tracemalloc.take_snapshot()
1039 domain_filter = tracemalloc.DomainFilter(True, self.domain)
1040 snapshot = snapshot.filter_traces([domain_filter])
1041 return sum(trace.size for trace in snapshot.traces)
1042
1043 def check_track(self, release_gil):
1044 nframe = 5

Callers 6

check_trackMethod · 0.95
check_untrackMethod · 0.95
test_reset_peakMethod · 0.80
benchmark_memoryMethod · 0.80
measure_peak_memoryMethod · 0.80

Calls 1

filter_tracesMethod · 0.80

Tested by

no test coverage detected