l.t.RequestTimelineCollector : class documentation

Part of lp.testing View In Hierarchy

Collect timeline events logged in web requests.

These are only retrievable at the end of a request, and for tests it is useful to be able to make assertions about the calls made during a request: this class provides a tool to gather them in a simple fashion.

See StormStatementRecorder for a Storm-specific collector that works outside a request.

Instance VariablescountThe count of db queries the last web request made.
queriesThe list of queries made. See lp.services.webapp.adapter.get_request_statements for more information.
Method __init__ Undocumented
Method register Start counting queries.
Method __enter__ Undocumented
Method __call__ Undocumented
Method unregister Undocumented
Method __exit__ Undocumented
def __init__(self):
Undocumented
def register(self):
Start counting queries.

Be sure to call unregister when finished with the collector.

After each web request the count and queries attributes are updated.

def __enter__(self):
Undocumented
def __call__(self, event):
Undocumented
def unregister(self):
Undocumented
def __exit__(self, exc_type, exc_value, traceback):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.