Created
October 16, 2017 10:50
-
-
Save mrsiano/c837ec90c3229be19e302825096ea8de to your computer and use it in GitHub Desktop.
ovirt python sdk performance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ovirtsdk4 | |
import time | |
api = ovirtsdk4.Connection('https://<server>/ovirt-engine/api', 'admin@internal', '<pass>', | |
True, compress=True, debug=False, log=False) | |
def gettime(cap=None): | |
start = time.time() | |
api.system_service().hosts_service().list(max=cap) | |
if cap is None: | |
print 'list size cap {0} response time {1}'.format(len(api.system_service().hosts_service().list(max=cap)), time.time() - start) | |
else: | |
print 'list size cap {0} response time {1}'.format(cap, time.time() - start) | |
if __name__ == '__main__': | |
gettime(None) | |
gettime(300) | |
gettime(500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment