Django is just Python, after all, so you can use the same approach that you would in "regular python scripts". "when a view is rendered" is a pretty vague description of what you're aiming to profile. If your start point is the request coming in to Django, and your stop point is the rendered response exiting Django, then I'd write a piece of custom middleware. If, on the other hand, you're aiming to profile a specific method of a view (like rendering a template), then you'll want to target the method itself. You could do this with a decorator if you're using FBVs, or a abstract base class if you're using CBVs. This approach is nice because you're abstracting away the profiling code which allows you to easily reuse it.
Hope this helps a little, JDB On Thu, Dec 12, 2013 at 4:52 PM, Christopher Welborn <[email protected]>wrote: > My previous post was lengthy. I just need to find out how much memory > is being used server-side when a view is rendered. I know it's possible > to do this for regular python scripts, but I'm not sure how to measure > my Django site. Django 1.6, Python 3.3, apache2, postgresql. > > > Any help would be much appreciated, I won't mention it again if I > don't receive an answer. > > -- > > - Christopher Welborn <[email protected]> > http://welbornprod.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/l8di7q%24ig8%241%40ger.gmane.org. > For more options, visit https://groups.google.com/groups/opt_out. > -- Jonathan D. Baker Developer http://jonathandbaker.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPMFOb6_wDcThapqXME%2Bi%2BKdLs1x7Ut3yXuMP-qMy92x_Z4rYw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

