added a dummy code on how to add profiler with least code changes. Tried quite a few things to emulate before_filter kind of thing of Rails but finally used http://stackoverflow.com/questions/5513558/executing-code-for-every-method-call-in-a-ruby-module