def profiler_call_hook(self, *args, **kw): """A call hook """ mt = self.meta_type sid = self.getId() profiler.startCall(mt, sid) try: return self.profiler_call_original(*args, **kw) finally: profiler.endCall()
def testMark(self): request = DummyRequest() profiler.startRequest(request) profiler.startCall('foo', 'bar') profiler.startCall('foo', 'flebb') profiler.endCall() profiler.endCall() profiler.endRequest() self.assertEqual(len(profiler.transaction), 1) request, = profiler.transaction.values()
def profiler_call_hook(self, *args, **kw): '''A call hook ''' mt = self.meta_type sid = self.getId() profiler.startCall(mt, sid) try: return self.profiler_call_original(*args, **kw) finally: profiler.endCall()