[BangPypers] log and figure out what bits are slow and optimize them.

Devi asldevi at gmail.com
Mon Feb 13 07:00:21 CET 2012


On Fri, Feb 10, 2012 at 5:59 PM, Saju M <sajuptpm at gmail.com> wrote:
> Hi,
>
> I want to log time taken to complete database requests inside a
> method/function using decorator .  is it possible ????
> I think, i have to inject log code inside the method/fuctions or modify it.
> I wrote a decorator to log taken by a method/function to complete it
> execution and its working well.
>
> My requirement : log everything and figure out what bits are slow and
> optimize them.
>
> What are your suggestions ??

If your webapp(?) is built using django or flask - django debug
toolbar [1] or flask-debug toolbar[2] could be of immense help. They
provide a wonderful web interface to show logs, database requests
etc..

[1]: https://github.com/django-debug-toolbar/django-debug-toolbar
[2]: https://github.com/mvantellingen/flask-debugtoolbar

-- 
~Devi


More information about the BangPypers mailing list