As per IRC, here are the refactored logger utils. There is also a suggested implementation to hook the perf logger directly into parent make_request but, honestly, I'm not a big fan of this solution. Let me know if you want this commit revert.
hook a generic perf logger into base make_request
factorize + generalize logger utils
fix copy/paste filepath var (did I commit whithout testing ? :s)
move perflog to DEBUG verbosity level
Any update on this ?
Profile isn't something that should generally be turned on in production, and I'm curios to know what the performance hit is for simply calculating the elapsed time. It may be irrelevant, but it certainly isn't a zero-cost initiative even when performance checking is turned off.
I'd feel much better if there was a simple way to turn off all performance calculations entirely.
add 'boto.enable_performance_logger' flag to globally enable/disable …
…the performance logger. Turn it off by default
This is a good point. I added a flag to turn the logger on. It is off by default. I don't know if it saves much though.
boto.perf formating (bis)
We decided to change the logging level to debug on the performance logging in dynamodb/layer1.py. This should eliminate logging for all normal conditions.
Switch perflog to log at debug level for dynamodb