I have a python application that has some performance hiccups. I want to add the garbage collector’s events (especially, when does it get called) to my logs. Is it possible?
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://docs.python.org/library/gc.html#gc.set_debug
You can set the Flags, but they get written to stderr.
Available flags are
ALSO
When you are dealing with performance, you might wish to profile your code for exhaustive Loops or Function calls. You can use
cProfileorhotshot. More here http://docs.python.org/library/profile.html