def get_traced_memory(self):
    snapshot = tracemalloc.take_snapshot()
    domain_filter = tracemalloc.DomainFilter(True, self.domain)
    snapshot = snapshot.filter_traces([domain_filter])
    return sum((trace.size for trace in snapshot.traces))
def get_traced_memory(self):
    snapshot = tracemalloc.take_snapshot()
    domain_filter = tracemalloc.DomainFilter(True, self.domain)
    snapshot = snapshot.filter_traces([domain_filter])
    return sum((trace.size for trace in snapshot.traces))