summaryrefslogtreecommitdiffstats
path: root/test/debug_internal.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/debug_internal.py')
-rw-r--r--test/debug_internal.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/debug_internal.py b/test/debug_internal.py
index 2cbee27ec81..fe10db7ee7f 100644
--- a/test/debug_internal.py
+++ b/test/debug_internal.py
@@ -4,6 +4,7 @@ import vpp_papi
from vpp_papi_provider import VppPapiProvider
import objgraph
from pympler import tracker
+
tr = tracker.SummaryTracker()
"""
@@ -18,16 +19,16 @@ def on_tear_down_class(cls):
tr.print_diff()
objects = gc.get_objects()
counter = 0
- with open(cls.tempdir + '/python_objects.txt', 'w') as f:
+ with open(cls.tempdir + "/python_objects.txt", "w") as f:
interesting = [
- o for o in objects
- if isinstance(o, (VppPapiProvider, vpp_papi.VPP))]
+ o for o in objects if isinstance(o, (VppPapiProvider, vpp_papi.VPP))
+ ]
del objects
gc.collect()
for o in interesting:
- objgraph.show_backrefs([o], max_depth=5,
- filename="%s/%s.png" %
- (cls.tempdir, counter))
+ objgraph.show_backrefs(
+ [o], max_depth=5, filename="%s/%s.png" % (cls.tempdir, counter)
+ )
counter += 1
refs = gc.get_referrers(o)
pp = pprint.PrettyPrinter(indent=2)