9 def _wrapper(self, *args, **kwargs):
11 setattr(object, "__%s" % meth.__name__, meth)
12 cProfile.runctx('object.__%s(object, *args, **kwargs)' % (meth.__name__, ), globals(), locals(),
13 "profile.%d" % os.getpid())
15 functools.update_wrapper(_wrapper, meth)