Change in vdsm[master]: host stats: Collect stats from online cpu cores only

fromani at redhat.com fromani at redhat.com
Fri Oct 2 07:57:09 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: host stats: Collect stats from online cpu cores only
......................................................................


Patch Set 7: Code-Review+1

(1 comment)

preliminary ACK, seems OK

https://gerrit.ovirt.org/#/c/46269/7/vdsm/virt/sampling.py
File vdsm/virt/sampling.py:

Line 693:         for cpu_core in cpu_cores:
Line 694:             # Do not try to collect cpu core data when no samples are present
Line 695:             if (not last_sample.cpuCores.getCoreSample(cpu_core) or not
Line 696:                     first_sample.cpuCores.getCoreSample(cpu_core)):
Line 697:                 continue
ok, it is consistent with what we do with interfaces (below), and I don't really mind here if we go LBYL instead of EAFP ( https://docs.python.org/2/glossary.html#term-eafp
https://docs.python.org/2/glossary.html#term-lbyl )
Line 698:             core_stat = {
Line 699:                 'nodeIndex': int(node_index),
Line 700:                 'cpuUser': compute_cpu_usage(cpu_core, 'user'),
Line 701:                 'cpuSys': compute_cpu_usage(cpu_core, 'sys'),


-- 
To view, visit https://gerrit.ovirt.org/46269
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9c247f9138e02a9230a0849a04cb2e1705e7fac
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list