X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/153bc4288d5941dafcaca24fe1f4859419d744e0..2d0cc46d3bc3357c19d13fc585c0a9492e5ee1b7:/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