]> git.e2factory.org Git - e2factory.git/commit
Hook every function and log its call
authorTobias Ulmer <tu@emlix.com>
Fri, 29 Jun 2012 19:23:33 +0000 (21:23 +0200)
committerTobias Ulmer <tu@emlix.com>
Fri, 29 Jun 2012 19:23:33 +0000 (21:23 +0200)
commit4520f776f9e7cbf391419fb74645d9684be3ba0d
tree4b059d14d4203ceccc9b71938c35235883ddc5fb
parenta9809e380cc707748d1585353be591637223e59d
Hook every function and log its call

e2lib.tracer hooks into the debug functionality of the lua interpreter
and gets called every time a lua function is called. This allows
detailed logging (at log level 4) without cluttering the code with log()
calls.

tracer() uses two function name blacklists to reduce the amount of
noise.

tracer() comes with a speed penalty, due to hooking, calling the
function itself and added IO overhead. Meassurements show a ~15% runtime
increase in a number of tests.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua