Change in vdsm[master]: status: adding elapsed time in millis
piotr.kliczewski at gmail.com
piotr.kliczewski at gmail.com
Mon May 18 19:24:08 UTC 2015
Piotr Kliczewski has posted comments on this change.
Change subject: status: adding elapsed time in millis
......................................................................
Patch Set 3:
(4 comments)
https://gerrit.ovirt.org/#/c/40904/3//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2015-05-13 17:44:59 +0200
Line 4: Commit: pkliczewski <piotr.kliczewski at gmail.com>
Line 5: CommitDate: 2015-05-18 16:28:04 +0200
Line 6:
Line 7: status: adding elapsed time in millis
> ok, but please explain why we need more time resolution.
Done
Line 8:
Line 9:
Line 10: Change-Id: I38727e0eac7cb29c1dc7c9696568540b6545461c
https://gerrit.ovirt.org/#/c/40904/3/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:
Line 7020: 'displayType': 'VmDisplayType', 'displayIp': 'str', 'pid': 'uint',
Line 7021: 'vmType': 'VmType', 'kvmEnable': 'bool',
Line 7022: 'network': 'NetworkInterfaceStatsMap',
Line 7023: 'disks': 'VmDiskStatsMap', 'monitorResponse': 'int',
Line 7024: 'elapsedTime': 'uint', 'elapsedTime_in_milis': 'uint',
> still needed? Please rename elapsedTimeMS (or Ms :))
Done
Line 7025: '*cdrom': 'str', '*boot': 'VmBootMode', 'cpuSys': 'float',
Line 7026: 'cpuUser': 'float', 'acpiEnable': 'bool', 'timeOffset': 'uint',
Line 7027: 'clientIp': 'str', 'pauseCode': 'str', 'memUsage': 'uint',
Line 7028: 'username': 'str', 'session': 'GuestSessionState',
https://gerrit.ovirt.org/#/c/40904/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 398: self.cif.notify('|virt|VM_status|' + self.id,
Line 399: **{self.id: stats})
Line 400:
Line 401: def _get_elapsed_time_in_millis(self):
Line 402: return str(int(
> no need of esplicit int(), the two operands are already int()
Done
Line 403: self._get_time_to_millis(time.time()) -
Line 404: self._get_time_to_millis(self._startTime)
Line 405: ))
Line 406:
Line 404: self._get_time_to_millis(self._startTime)
Line 405: ))
Line 406:
Line 407: def _get_time_to_millis(self, time):
Line 408: return int(round(time * 1000))
> I'm becoming diffident about oneliners. How does the code look if you just
Will inline
Line 409:
Line 410: lastStatus = property(_get_lastStatus, _set_lastStatus)
Line 411:
Line 412: def __getNextIndex(self, used):
--
To view, visit https://gerrit.ovirt.org/40904
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I38727e0eac7cb29c1dc7c9696568540b6545461c
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list