Alternates, to that of instrumenting the code to emit log statements, is
to use the python profiler or debugger.
*Debugger*
Debug your code by running it in debug mode. I use Eclipse / Pydev to
debug my python code. There are quite a few options there. This is good
thing to do if you have single-threaded synchronous calls in your code.
Else, it can get a bit unwieldly when you are dealing with
multi-threaded programs.
*Profiler*
Follow the instructions here:
http://www.vrplumber.com/programming/runsnakerun/
And in case you want to do some advanced debugging of your code:
https://wiki.python.org/moin/DebuggingWithGdb
This provides rather good insight into your code.
________________________________________
Kiran Subbaraman
http://subbaraman.wordpress.com/about/
On Fri, 03-03-2017 1:39 PM, lyn2py wrote:
I've written an app that is quite involved, and it has gotten very
slow as I add code to it. I would like to see what goes on behind the
scenes (like what function was invoked, what variables were passed to
the function, and if possible, the time it takes to run), so that I
don't have the code doing unnecessary stuff.
Is there a way to do that with web2py without having to go into each
function / Class method to include a logging device?
Thank you.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google
Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.