mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-29 11:21:45 +03:00
domain: Don't fetch XML on tick to get vcpu count
It's available in the domain info structure. Saves us from hammering xenstored and just plain doing to much work on every tick.
This commit is contained in:
parent
a815fa17a7
commit
9dc799af9c
@ -1152,10 +1152,10 @@ class vmmDomain(vmmLibvirtObject):
|
||||
|
||||
if not (info[0] in [libvirt.VIR_DOMAIN_SHUTOFF,
|
||||
libvirt.VIR_DOMAIN_CRASHED]):
|
||||
guestcpus = info[3]
|
||||
cpuTime = info[4] - prevCpuTime
|
||||
cpuTimeAbs = info[4]
|
||||
hostcpus = self.conn.host_active_processor_count()
|
||||
guestcpus = self.vcpu_count()
|
||||
|
||||
pcentbase = (((cpuTime) * 100.0) /
|
||||
((now - prevTimestamp) * 1000.0 * 1000.0 * 1000.0))
|
||||
|
Loading…
Reference in New Issue
Block a user