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

Saju M sajuptpm at gmail.com
Fri Feb 10 14:00:43 CET 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 and want to use it in production.
      I think, we can't permanently include profile's debugging code in
source code,
     will cause any performance issue ??


On Fri, Feb 10, 2012 at 6:20 PM, Noufal Ibrahim <noufal at nibrahim.net.in>wrote:

> Saju M <sajuptpm at gmail.com> writes:
>
> > 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 ??
>
> Use a profiler. http://docs.python.org/library/profile.html
>
> [...]
>
>
> --
> ~noufal
> http://nibrahim.net.in
>
> We're overpaying him, but he's worth it. -Samuel Goldwyn
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Regards
Saju Madhavan
+91 09535134654

Anyone who has never made a mistake has never tried anything new -- Albert
Einstein


More information about the BangPypers mailing list