@inspect_command(default_timeout=60.0, args=[(u'type', text_t), (u'num', int), (u'max_depth', int)], signature=u'[object_type=Request] [num=200 [max_depth=10]]')
def objgraph(state, num=200, max_depth=10, type=u'Request'):
 try:
  import objgraph as _objgraph
 except ImportError:
  raise ImportError(u'Requires the objgraph library')
 logger.info(u'Dumping graph for type %r', type)
 with tempfile.NamedTemporaryFile(prefix=u'cobjg', suffix=u'.png', delete=False) as fh:
  objects = _objgraph.by_type(type)[:num]
  _objgraph.show_backrefs(objects, max_depth=max_depth, highlight=(lambda v: (v in objects)), filename=fh.name)
  return {u'filename': fh.name}

@ inspect_command ( default_timeout = 60.0 , args = [ ( u'type' , text_t ) , ( u'num' , int ) , ( u'max_depth' , int ) ] , signature = u'[object_type=Request] [num=200 [max_depth=10]]' ) def objgraph ( state , num = 200 , max_depth = 10 , type = u'Request' ) : try : import objgraph as _objgraph except ImportError : raise ImportError ( u'Requires the objgraph library' ) logger . info ( u'Dumping graph for type %r' , type ) with tempfile . NamedTemporaryFile ( prefix = u'cobjg' , suffix = u'.png' , delete = False ) as fh : objects = _objgraph . by_type ( type ) [ : num ] _objgraph . show_backrefs ( objects , max_depth = max_depth , highlight = ( lambda v : ( v in objects ) ) , filename = fh . name ) return { u'filename' : fh . name }
create graph of uncollected objects .