X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/153bc4288d5941dafcaca24fe1f4859419d744e0..a5d0aab8bef13d4fd4ea19c6b08d703453f3f47d:/apps/wolnelektury_core/management/profile.py?ds=inline 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