mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-01 16:36:06 +00:00
perf(vrtManager): a pool's size is read with one info call
get_size() called pool.info() twice for its capacity and free space, two libvirt calls on every pool page and API read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
235b4ad285
commit
7b5ccff8f5
2 changed files with 8 additions and 1 deletions
|
|
@ -155,7 +155,8 @@ class wvmStorage(wvmConnect):
|
|||
return "Unknown"
|
||||
|
||||
def get_size(self):
|
||||
return [self.pool.info()[1], self.pool.info()[3]]
|
||||
_state, capacity, _allocation, available = self.pool.info()
|
||||
return [capacity, available]
|
||||
|
||||
def _XMLDesc(self, flags):
|
||||
return self.pool.XMLDesc(flags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue