X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/153bc4288d5941dafcaca24fe1f4859419d744e0..3726f9b225fb5c39cbf067f53d4cf6f7d8a9f326:/apps/wolnelektury_core/management/profile.py?ds=sidebyside diff --git a/apps/wolnelektury_core/management/profile.py b/apps/wolnelektury_core/management/profile.py index a68453d05..90e5ec5f5 100644 --- a/apps/wolnelektury_core/management/profile.py +++ b/apps/wolnelektury_core/management/profile.py @@ -1,6 +1,7 @@ import cProfile import functools +import os _object = None @@ -9,7 +10,7 @@ def profile(meth): object = self setattr(object, "__%s" % meth.__name__, meth) cProfile.runctx('object.__%s(object, *args, **kwargs)' % (meth.__name__, ), globals(), locals(), - "wlprofile") + "profile.%d" % os.getpid()) functools.update_wrapper(_wrapper, meth) return _wrapper