From Dan Kenigsberg :
Dan Kenigsberg has submitted this change and it was merged.
Change subject: hostdev: add caching of device tree
..
hostdev: add caching of device tree
Previously, we've kept asking libvirt about devices and parsed them as
we went. This had unfortunate effect of O(n^2) complexity with O(n)
libvirt calls.
Now, we are able to accomplish what we previously did in O(n) time
with a O(1) calls.
Previous run: (interrupted, too boring)
time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
test_3k_storage_devices hostdevTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_',
'^setup\\.py$']
hostdevTests.HostdevPerformanceTests
test_3k_storage_devices ^C
--
Ran 1 test in 506.604s
OK
real8m26.956s
user8m26.572s
sys 0m0.385s
Run after caching:
time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
test_3k_storage_devices hostdevTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_',
'^setup\\.py$']
hostdevTests.HostdevPerformanceTests
test_3k_storage_devices OK
--
Ran 1 test in 2.656s
OK
real0m3.010s
user0m2.951s
sys 0m0.060s
(approx ~1.9s for the call itself)
Change-Id: I5b901fac8df23aed958fb9509008f9cfaee648c3
Bug-Url: https://bugzilla.redhat.com/1398572
Signed-off-by: Martin Polednik
---
M lib/vdsm/hostdev.py
1 file changed, 64 insertions(+), 22 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Francesco Romani: Looks good to me, approved
Martin Polednik: Verified
--
To view, visit https://gerrit.ovirt.org/67457
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5b901fac8df23aed958fb9509008f9cfaee648c3
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik
Gerrit-Reviewer: Dan Kenigsberg
Gerrit-Reviewer: Francesco Romani
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik
Gerrit-Reviewer: Milan Zamazal
Gerrit-Reviewer: Yaniv Kaul
Gerrit-Reviewer: gerrit-hooks
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org