Skip to content

Comment on Chronic - Python Instrumentation

Comments

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. :)

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!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.