# cherrypy.lib.gctools module

class cherrypy.lib.gctools.GCRoot

  Bases: `object`

  A CherryPy page handler for testing reference leaks.

  classes = [(<class 'cherrypy._cprequest.Request'>, 2, 2, 'Should be 1 in this request thread and 1 in the main thread.'), (<class 'cherrypy._cprequest.Response'>, 2, 2, 'Should be 1 in this request thread and 1 in the main thread.'), (<class 'cherrypy._cpwsgi.AppResponse'>, 1, 1, 'Should be 1 in this request thread only.')]
  index()
  stats()

class cherrypy.lib.gctools.ReferrerTree(ignore=None, maxdepth=2, maxparents=10)

  Bases: `object`

  An object which gathers all referrers of an object to a given depth.

  _format(obj, descend=True)

    Return a string representation of a single object.

  ascend(obj, depth=1)

    Return a nested list containing referrers of the given object.

  format(tree)

    Return a list of string reprs from a nested list of referrers.

  peek(s)

    Return s, restricted to a sane length.

  peek_length = 40

class cherrypy.lib.gctools.RequestCounter(bus)

  Bases: `SimplePlugin`

  after_request()
  before_request()
  start()

cherrypy.lib.gctools.get_context(obj)

cherrypy.lib.gctools.get_instances(cls)