Martin Sivák has posted comments on this change.

Change subject: Fix memShared units when reported from MOM
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/28115/3/vdsm/momIF.py
File vdsm/momIF.py:

Line 60:         stats = self._mom.getStatistics()['host']
Line 61:         ret = {}
Line 62:         ret['ksmState'] = bool(stats['ksm_run'])
Line 63:         ret['ksmPages'] = stats['ksm_pages_to_scan']
Line 64:         ret['memShared'] = stats['ksm_pages_sharing'] * 
API.PAGE_SIZE_BYTES
> I find the intermediate assignment to ret['memShared'] a bit confusing, as 
I tried.. but the line is about 3 characters too long for our PEP8 check..

Adding parentheses and splitting to two lines makes it either hard to read or 
fail with visual under/over indent.
Line 65:         ret['memShared'] /= Mbytes
Line 66:         ret['ksmCpu'] = stats['ksmd_cpu_usage']
Line 67:         return ret
Line 68: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6a68221d74192c38de158fca4d5f96f268150ab
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Lee Yarwood <lyarw...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to