Nir Soffer has posted comments on this change.
Change subject: utils: Add stopwatch for timing operations
......................................................................
Patch Set 3:
(1 comment)
https://gerrit.ovirt.org/#/c/29685/3/lib/vdsm/utils.py
File lib/vdsm/utils.py:
Line 1299:
Line 1300:
Line 1301: @contextmanager
Line 1302: def stopwatch(message, log=logging.getLogger('vds.stopwatch')):
Line 1303: if log.isEnabledFor(logging.DEBUG):
Not sure if would be useful to tune this (DEBUG/INFO/etc.) but we
could mak
Lets wait until we have actual use case.
Line 1304: start = monotonic_time()
Line 1305: yield
Line 1306: elapsed = monotonic_time() - start
Line 1307: log.debug("%s: %.2f seconds", message, elapsed)
--
To view, visit
https://gerrit.ovirt.org/29685
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0a60538936dbb4596243abe9d731779fd9efb47
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes