Change in vdsm[master]: Add profiling decorator utility.

gvallare at redhat.com gvallare at redhat.com
Thu Jun 27 18:16:33 UTC 2013


Giuseppe Vallarelli has posted comments on this change.

Change subject: Add profiling decorator utility.
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

Only a minor fix is needed.

....................................................
File lib/vdsm/utils.py
Line 902:     sys.exit(-3)
Line 903: 
Line 904: 
Line 905: def profile(func):
Line 906:     func_name = func.__name__
You should use http://docs.python.org/2/library/functools.html#functools.wraps.
Line 907: 
Line 908:     def profiled_execution(*args, **kwargs):
Line 909:         logging.info('profiling method %s' % func_name)
Line 910:         profiler = cProfile.Profile()


-- 
To view, visit http://gerrit.ovirt.org/16175
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I540d0200f488a6de6b5c43e7439e8eb352ea456b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list