Dan Kenigsberg has posted comments on this change.

Change subject: Returning namedtuple from util.pidStat for simpler usage
......................................................................


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

(1 inline comment)

I had a major bug due to miscounting of namedtuple fields. Please do not repeat 
my mistakes.

....................................................
File lib/vdsm/utils.py
Line 168: 
Line 169: 
Line 170: def pidStat(pid):
Line 171:     res = []
Line 172:     stat = namedtuple('stat', 'pid comm state ppid pgrp session \
Better use a list of fields here, and use its Len() later, instead of hardcoded 
44.
Line 173:                       tty_nr tpgid flags minflt cminflt majflt 
cmajflt \
Line 174:                       utime stime cutime cstime priority nice 
num_threads \
Line 175:                       itrealvalue starttime vsize rss rsslim \
Line 176:                       startcode endcode startstack kstkesp \


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7cbac1c9175afbdecf42d40290026d518098e193
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Royce Lv <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[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