Federico Simoncelli has posted comments on this change.
Change subject: Move the lastCheck computation in getRepoStats
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File vdsm/storage/sp.py
Line 1370: res[sdUUID] = {
Line 1371: 'finish' : st.lastCheck,
Line 1372: 'result' : {
Line 1373: 'code' : code,
Line 1374: 'lastCheck' : '%.1f' % (now - st.lastCheck),
The only operations you're doing here is copying data from one structure to
another, hence it won't take any relevant time even if you have thousands of
storage domains.
There are no syscall in any of the st properties. If you move the time.time()
inside lastCheck then you indeed have a syscall per st.lastCheck evaluation,
which is useless.
Line 1375: 'delay' : str(st.readDelay),
Line 1376: 'valid' : (st.error is None)
Line 1377: },
Line 1378: 'disktotal' : disktotal,
--
To view, visit http://gerrit.ovirt.org/7993
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I58de0c517bc6940f21c7f6506854c9d9735e964b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Ryan Harper <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches