Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/lib64/python3....
File: tracemalloc.py
[500] Fix | Delete
def statistics(self, key_type, cumulative=False):
[501] Fix | Delete
"""
[502] Fix | Delete
Group statistics by key_type. Return a sorted list of Statistic
[503] Fix | Delete
instances.
[504] Fix | Delete
"""
[505] Fix | Delete
grouped = self._group_by(key_type, cumulative)
[506] Fix | Delete
statistics = list(grouped.values())
[507] Fix | Delete
statistics.sort(reverse=True, key=Statistic._sort_key)
[508] Fix | Delete
return statistics
[509] Fix | Delete
[510] Fix | Delete
def compare_to(self, old_snapshot, key_type, cumulative=False):
[511] Fix | Delete
"""
[512] Fix | Delete
Compute the differences with an old snapshot old_snapshot. Get
[513] Fix | Delete
statistics as a sorted list of StatisticDiff instances, grouped by
[514] Fix | Delete
group_by.
[515] Fix | Delete
"""
[516] Fix | Delete
new_group = self._group_by(key_type, cumulative)
[517] Fix | Delete
old_group = old_snapshot._group_by(key_type, cumulative)
[518] Fix | Delete
statistics = _compare_grouped_stats(old_group, new_group)
[519] Fix | Delete
statistics.sort(reverse=True, key=StatisticDiff._sort_key)
[520] Fix | Delete
return statistics
[521] Fix | Delete
[522] Fix | Delete
[523] Fix | Delete
def take_snapshot():
[524] Fix | Delete
"""
[525] Fix | Delete
Take a snapshot of traces of memory blocks allocated by Python.
[526] Fix | Delete
"""
[527] Fix | Delete
if not is_tracing():
[528] Fix | Delete
raise RuntimeError("the tracemalloc module must be tracing memory "
[529] Fix | Delete
"allocations to take a snapshot")
[530] Fix | Delete
traces = _get_traces()
[531] Fix | Delete
traceback_limit = get_traceback_limit()
[532] Fix | Delete
return Snapshot(traces, traceback_limit)
[533] Fix | Delete
[534] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function