Running for all actions and adjusted include path to work from that folder.

This commit is contained in:
Joshua Harlow 2012-02-17 22:00:12 -08:00
parent 53d1c7c38d
commit b82577499b

View File

@ -1,5 +1,10 @@
import objgraph
import inspect
import sys
import os
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir))
sys.path.insert(0, possible_topdir)
from devstack import settings
from devstack.progs import common
@ -16,17 +21,19 @@ def filter_c(c):
return True
action = settings.INSTALL
klss = list()
for c in comps.keys():
kls = common.get_action_cls(action, c, distro)
klss.append(kls)
actions = settings.ACTIONS
for action in actions:
klss = list()
max_depth = 5
fn = "%s.png" % (action)
objgraph.show_refs(klss,
filename=fn,
max_depth=max_depth,
highlight=inspect.isclass,
filter=filter_c,
extra_ignore=[id(locals())])
for c in comps.keys():
kls = common.get_action_cls(action, c, distro)
klss.append(kls)
max_depth = 5
fn = "%s.png" % (action)
objgraph.show_refs(klss,
filename=fn,
max_depth=max_depth,
highlight=inspect.isclass,
filter=filter_c,
extra_ignore=[id(locals())])