How can I measure time taken for template generation?
I know i can collect time Context.render() takes but can i do it unobtrusive way? Something like Page Stats Middleware do for Python and DB time… But split Python time to code/view time and template time?
How can I measure time taken for template generation? I know i can collect
Share
You could swap old render method to your own like this:
This shouldn’t be very obtrusive and you can remove it anytime you won’t – it doesn’t change interface.
I don’t believe you can use
middleware, becausemiddlewareworks beforerequestis passed to aview– and you render a template inside a view.