mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
perf(computes): the host's info is read once per request
The overview read the host's info four times, now once (12 libvirt calls). A connection object keeps it next to the capabilities, and the VM page and VM stats take it from there; the VM page's cached_reads block holds only the VM's own data. Free memory is still read each time.
This commit is contained in:
parent
9adc808d26
commit
57f592df70
6 changed files with 57 additions and 32 deletions
|
|
@ -403,6 +403,11 @@ class wvmConnect(object):
|
|||
"""The host's capabilities, read once per object (a request): most getters below parse them"""
|
||||
return self.wvm.getCapabilities()
|
||||
|
||||
@cached_property
|
||||
def host_info(self):
|
||||
"""The host's info (architecture, memory in MiB, CPUs, ...), read once per object"""
|
||||
return self.wvm.getInfo()
|
||||
|
||||
@cached_property
|
||||
def dom_cap_xmls(self):
|
||||
"""The domain capabilities read so far, by emulator, arch, machine and domain type"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue