cherrypy.lib.gctools模块

class cherrypy.lib.gctools.GCRoot[源代码]

基类:object

用于测试引用泄漏的Cherrypy页处理程序。

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)[源代码]

基类:object

将一个对象的所有引用集合到给定深度的对象。

_format(obj, descend=True)[源代码]

返回单个对象的字符串表示形式。

ascend(obj, depth=1)[源代码]

返回包含给定对象的引用者的嵌套列表。

format(tree)[源代码]

从嵌套的引用者列表中返回字符串代表的列表。

peek(s)[源代码]

返回s,限制为正常长度。

peek_length = 40
class cherrypy.lib.gctools.RequestCounter(bus)[源代码]

基类:cherrypy.process.plugins.SimplePlugin

after_request()[源代码]
before_request()[源代码]
start()[源代码]
cherrypy.lib.gctools.get_context(obj)[源代码]
cherrypy.lib.gctools.get_instances(cls)[源代码]