Change in vdsm[master]: sampling: Collect numa related statistics

msivak at redhat.com msivak at redhat.com
Tue Apr 22 07:43:52 UTC 2014


Martin Sivák has posted comments on this change.

Change subject: sampling: Collect numa related statistics
......................................................................


Patch Set 1:

(3 comments)

I think it looks reasonable, I only have some nits.

http://gerrit.ovirt.org/#/c/26876/1/vdsm/virt/sampling.py
File vdsm/virt/sampling.py:

Line 129:     The sample is taken at initialization time and can't be updated.
Line 130:     """
Line 131:     def __init__(self):
Line 132:         self._coresSample = {}
Line 133:         pattern = re.compile(r'cpu(\d+)\s+(.*)')
I would make the regexp compilation a constant at the class level so it is evaluated only once and not with every class instantiation.
Line 134:         with open('/proc/stat') as src:
Line 135:             for line in src:
Line 136:                 match = pattern.match(line)
Line 137:                 if match:


http://gerrit.ovirt.org/#/c/26876/1/vdsm_api/vdsmapi-schema.json
File vdsm_api/vdsmapi-schema.json:

Line 1643: # @memPercent:  The ratio of used memory
Line 1644: #
Line 1645: # Since: 4.15.0
Line 1646: ##
Line 1647: {'type': 'NumaNodeMemoryStats', 
whitespaces at the end of the line
Line 1648:  'data': {'memFree': 'uint', 'memPercent': 'uint'}}
Line 1649: 
Line 1650: ##
Line 1651: # @CpuCoreStats:


Line 1658: # @cpuUser:         Ratio of CPU time spent in userspace
Line 1659: #
Line 1660: # Since: 4.15.0
Line 1661: ##
Line 1662: {'type': 'CpuCoreStats', 
whitespaces again.
Line 1663:  'data': {'numaNodeIndex': 'uint', 'cpuSys': 'float',
Line 1664:           'cpuIdle': 'float', 'cpuUser': 'float'}}
Line 1665: 
Line 1666: ##


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8d2edd74b8b5d5d3d3e508afc3f675037a86597
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi at hp.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list