profile log with a pid. remove unecessary memory information
[wolnelektury.git] / apps / wolnelektury_core / management / profile.py
index a68453d..90e5ec5 100644 (file)
@@ -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