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

2012-02-14 Thread steve
Hi, If it's a production website you might want to look at NewRelic. We started using it a while back and it has been mighty helpful: http://newrelic.com http://newrelic.com/docs/python/new-relic-for-python cheers, - steve On 02/12/2012 08:09 PM, Anand Chitipothu wrote: > 2012/2/12 Saju M : >>

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

2012-02-13 Thread Vishal
Hi, Since you want to profile a single method (or a bunch of methods), it makes sense to line_profile them. you can add that capability as well. See:http://packages.python.org/line_profiler/ getit: http://pypi.python.org/pypi/line_profiler Enjoy, Visha

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

2012-02-12 Thread Saju M
Hi, I am using Turbogears On Mon, Feb 13, 2012 at 11:30 AM, Devi wrote: > On Fri, Feb 10, 2012 at 5:59 PM, Saju M 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 c

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

2012-02-12 Thread Devi
On Fri, Feb 10, 2012 at 5:59 PM, Saju M 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 me

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

2012-02-12 Thread Anand Chitipothu
2012/2/12 Saju M : > Hi, > I wrote a decorator using cProfile. > Issue is log-file getting messed up with logs of unwanted method > calls(library calls). > I tried with prof.getstats() and prof.print_stats(), prof.getstats() force > to code extra loops to get infos. > I am also planning to enable/d

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

2012-02-11 Thread Saju M
Hi, I wrote a decorator using cProfile. Issue is log-file getting messed up with logs of unwanted method calls(library calls). I tried with prof.getstats() and prof.print_stats(), prof.getstats() force to code extra loops to get infos. I am also planning to enable/disable this logging using DEBUG f

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

2012-02-10 Thread Noufal Ibrahim
Saju M writes: > 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. You should do this in development to identify pain points. The results might be interesting. > But, I need a fixed logging system and want to use i

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

2012-02-10 Thread Saju M
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 p

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

2012-02-10 Thread Noufal Ibrahim
Saju M 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 >

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

2012-02-10 Thread Saju M
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