log and figure out what bits are slow and optimize them.

Saju M sajuptpm at gmail.com
Fri Feb 10 07:42:56 EST 2012


Hi,

Yes i saw profile module,
I think i have to do function call via

cProfile.run('foo()')

I know, we can debug this way.

But i need a fixed logging system ..



On Fri, Feb 10, 2012 at 6:08 PM, Arnaud Delobelle <arnodel at gmail.com> wrote:

> On 10 February 2012 12:30, sajuptpm <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 ??
>
> Are you familiar with this?
>
> http://docs.python.org/library/profile.html
>
> --
> Arnaud
>



-- 
Regards
Saju Madhavan
+91 09535134654

Anyone who has never made a mistake has never tried anything new -- Albert
Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120210/8618b3b6/attachment-0001.html>


More information about the Python-list mailing list