Nir Soffer has posted comments on this change. Change subject: utils: Optimize namedtuple definition in pidStat ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/26097/1/lib/vdsm/utils.py File lib/vdsm/utils.py: Line 344: res.extend([int(item) for item in args[1:]]) Line 345: # Only 44 feilds are documented in man page while /proc/pid/stat has 52 Line 346: # The rest of the fields contain the process memory layout and Line 347: # exit_code, which are not relevant for our use. Line 348: return STAT._make(res[:len(STAT._fields)]) Note: _fields is not a private. Like _make, it uses an underscore prefix to prevent conflicts with field names. See http://docs.python.org/2.7/library/collections.html#namedtuple-factory-function-for-tuples-with-named-fields. Line 349: Line 350: Line 351: def iteratePids(): Line 352: for path in glob.iglob("/proc/[0-9]*"): -- To view, visit http://gerrit.ovirt.org/26097 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5841b338cc0e9376c3bd7815206c27829c286d6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
