Hacker News new | ask | show | jobs
by drdaeman 4577 days ago
Trivial but useful. Next time, instead of kicking in my own custom timing decorator (5-liner, but...) I'll probably use this. [Edit: pycounter looks even nicer, didn't heard of them before, thanks for sharing!]

The only downside I see, it does record function name, but doesn't record module name (and, for class members, classname). For example, it wouldn't be too useful to see "authorize" instead of "ppp.common.authorize" in RADIUS server profiling logs. :)

2 comments

Yeah, the simplest thing to do would be to add the module name, which I may do. You can also pass a name parameter to the decorator.
Thanks for your thoughts!