Giuseppe Vallarelli has posted comments on this change.

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


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

(1 inline comment)

Toni have a look at the link.

....................................................
File lib/vdsm/utils.py
Line 903:     sys.exit(-3)
Line 904: 
Line 905: 
Line 906: def profile(func):
Line 907:     func_name = func.__name__
Sorry I've been a little cryptic in the previous comment, you don't need to 
create this func_name variable, @wraps takes care of that meaning that 
func.__name__ is the name of the original one (not the name of decorator) have 
a look to the example 
(http://docs.python.org/2/library/functools.html#functools.wraps).
Line 908: 
Line 909:     @wraps(func)
Line 910:     def profiled_execution(*args, **kwargs):
Line 911:         logging.info('profiling method %s' % func_name)


-- 
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: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to